Module Stringext
val string_after : string -> int -> string
string_after
s
n
returns the substring of s
that is after
character n
val quote : string -> string
equivalent to
Str.quote
val split : ?max:int -> string -> on:char -> string list
split
?max
s
~on
splits s
on every on
occurence upto
max
number of items if max
is specified. max
is assumed to
be a small number if specified. To not cause stack overflows
val full_split : string -> on:char -> string list
full_split
String.concat (full_split s ~on) =s
s
~on
will split s
on every occurence
of on
but will add the separators between the tokens. Maintains
the invariant:String.concat (full_split s ~on) =s
val trim_left : string -> string
Trims spaces on the left of the string
val split_trim_left : string -> on:string -> trim:string -> string list
split_strim_right
s
~on
~trim
splits s
on every character
in on
. Characters in trim
are trimmed from the left of every
result element