Module Biocaml_line (.ml)

Single line of text. See also Biocaml_lines.

module Biocaml_line: 
type t = private string 
A line is simply a string, possibly empty, that does not contain a newline character. As the name suggests, usually such strings are obtained by reading a file line by line.
val to_string : t -> string
val string_to_lines : string -> t list * bool
string_to_lines s splits s on newline characters, returning the resuling list of lines. The returned bool is true if the final line ended with a newline, or false otherwise.
val of_string_unsafe : string -> t
Return the given string without checking that it is a line. Useful for efficiency reasons if you're certain the given string is a line.

Standard String Operations

val lstrip : ?drop:(char -> bool) -> t -> t
val rstrip : ?drop:(char -> bool) -> t -> t
val strip : ?drop:(char -> bool) -> t -> t
val split : t -> on:char -> string list
val for_all : string -> f:(char -> bool) -> bool


val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t