Module Utils

module Utils: sig .. end
Miscellaneous utility functions.


String functions

val trim_left : string -> string
Returns a copy of the string without leading whitespace.
val trim_right : string -> string
Returns a copy of the string without trailing whitespace.
val trim : string -> string
Returns a copy of the string without leading and trailing whitespace.

I/O functions

val read_lines : string -> string list
read_lines filename returns the lines from the file named filename.

Raises an exception if an i/o error occurs.

val write_lines : string -> string list -> unit
write_lines filename lines writes the strings from lines to the file named filename.

Raises an exception if an i/o error occurs.