module Benl_core:sig..end
Utility functions and modules.
This module contains handy functions (or modules) not specific to Ben.
module StringSet:sig..end
module StringMap:sig..end
module IntMap:sig..end
val with_in_channel : Stdlib.in_channel -> (Stdlib.in_channel -> 'a) -> 'aRun the function on the in_channel, taking care of exceptions.
val with_in_file : string -> (Stdlib.in_channel -> 'a) -> 'aRun the function on the given file, taking care of exceptions.
val with_out_file : string -> (Stdlib.out_channel -> 'a) -> 'aRun the function on the given file, taking care of exceptions .
val escape_for_shell : string -> stringQuote a string for use with shell. For example, "a" is quoted
into "'a'".
val get_rfc2822_date : unit -> stringGet the current date in RFC-2822 format.
val list_rev_mapi : (int -> 'a -> 'b) -> 'a list -> 'b listSame as List.rev_map, but calls the function with the index of
the current element.
val uniq : 'a list -> 'a listRemove duplicates in a list.
val simple_split : char -> string -> string listsimple_split sep s splits s using sep as delimiter.
val capitalize : ?sep:char -> string -> stringcapitalize ?sep s capitalizes a field name.
val starts_with : string -> string -> boolstarts_with s prefix returns true iff s starts with
prefix.
val ends_with : string -> string -> boolends_with s suffix returns true iff s ends with suffix.