module Toolkit:Some small functions and shortcuts which I find convenient.sig..end
val (%) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'bval toggle : bool Pervasives.ref -> unitexception Empty_option
val opt_get : 'a option -> 'aval opt_getd : 'a -> 'a option -> 'amodule Global:sig..end
type'aglobal ='a Global.t
val aggreg_args : string list -> stringval is_blank_char : char -> boolval trim : string -> string
I have modified the first two so that they always return the string instead of
raising exceptions, which is what I need most of the time.
val first_chars : string -> int -> stringfirst_chars s n returns the first n characters of s, and s itself if n is too bigval last_chars : string -> int -> stringlast_chars s n returns the last n characters of s, and s itself if n is too bigval string_before : string -> int -> stringstring_before s n returns the substring of all characters of s
that precede position n (excluding the character at
position n).val string_after : string -> int -> stringstring_after s n returns the substring of all characters of s
that follow position n (including the character at
position n).val snippet : string -> int -> stringn+3 chars, the extra three being the "..." if the string
is trunctatedval subb : string -> int -> int -> stringString.sub, extracts between two positions, inclusivelyval pluralise : string -> int -> stringn > 2val map_tr : ('a -> 'b) -> 'a list -> 'b listval no_newline : string -> stringval lines_of_file : ?f:(string -> string) -> string -> string listval run_on_file : (string -> 'a) -> string -> unitval pl : string -> unitval pe : string -> unitval ps : string -> unitval pf : ('a, Pervasives.out_channel, unit) Pervasives.format -> 'aPrintf.printf: formated printing to stdoutval spf : ('a, unit, string) Pervasives.format -> 'aPrintf.sprintf: formated printing to stringval epf : ('a, Pervasives.out_channel, unit) Pervasives.format -> 'aPrintf.eprintf: formated printing to stderrval fpf : Pervasives.out_channel ->
('a, Pervasives.out_channel, unit) Pervasives.format -> 'aPrintf.fprintf: formated printing to output channelval va : ('a, unit, string) Pervasives.format -> 'aspf: formated printing to stdoutval tl : 'a list -> 'a listval hd : 'a list -> 'aval sof : float -> stringstring_of_floatval fos : string -> floatfloat_of_stringval soi : int -> stringstring_of_intval ios : string -> intint_of_stringval iof : float -> intint_of_floatval foi : int -> floatfloat_of_intval soff : float -> stringval iosd : string -> string -> intios with debug instructionsval iosz : string -> intios with zero in case of failureval strlen : string -> intval listlen : 'a list -> intval arrlen : 'a array -> intval break_string : string -> unitval stdinc : Pervasives.in_channelstdin as input channelval stdoutc : Pervasives.out_channelstdout as output channelval stdinf : Unix.file_descrstdin as a file descriptorval stdoutf : Unix.file_descrstdout as a file descriptorval hue : ('a -> 'b) -> 'a -> 'bUnix.handle_unix_errorval open_out_append : string -> Pervasives.out_channelval getport : string -> intval pidd : string -> unitval cpipe : ?nonblock:bool -> unit -> Pervasives.in_channel * Pervasives.out_channelval pdfork : ?nb:bool ->
(Pervasives.in_channel -> Pervasives.out_channel -> unit) ->
Pervasives.in_channel * Pervasives.out_channel(channel reading from the son, channel writing to the son)nb : is reading non-blocking ?f : function the son will be executing. It takes two arguments: the channels to reading from the son and writing to the son, respectively.val peek_line : Pervasives.in_channel -> string optioninput_line for non-blocking channels. None is returned if nothing is there.val string_of_sockaddr : Unix.sockaddr -> stringval repeat_pattern : string -> int -> stringval separator_double_line : stringval separator_line : stringval separator_solid_line : stringval av : string arrayval ac : intval al : string listval bad_args : string -> unit