module String:sig..end
val init : int -> (int -> char) -> stringinit l f returns the string of length l with the chars
f 0 , f 1 , f 2 ... f (l-1).val find : string -> string -> intfind s x returns the starting index of the string x
within the string s or raises Invalid_string if x
is not a substring of s.val split : string -> string -> string * stringsplit s sep splits the string s between the first
occurrence of sep.
raises Invalid_string if the separator is not found.val nsplit : string -> string -> string listnsplit s sep splits the string s into a list of strings
which are separated by sep.val join : string -> string list -> stringconcatval slice : ?first:int -> ?last:int -> string -> stringslice ?first ?last s returns a "slice" of the string
which corresponds to the characters s.[first],
s.[first+1], ..., s[last-1]. Note that the character at
index last is not included! If first is omitted it
defaults to the start of the string, i.e. index 0, and if
last is omitted is defaults to point just past the end of
s, i.e. length s. Thus, slice s is equivalent to
copy s.
Negative indexes are interpreted as counting from the end of
the string. For example, slice ~last:-2 s will return the
string s, but without the last two characters.
This function never raises any exceptions. If the
indexes are out of bounds they are automatically clipped.
val lchop : string -> stringval rchop : string -> stringval of_int : int -> stringval of_float : float -> stringval of_char : char -> stringval to_int : string -> intInvalid_string if the string does not represent an integer.val to_float : string -> floatval ends_with : string -> string -> boolends_with s x returns true if the string s is ending with x.val starts_with : string -> string -> boolstarts_with s x return true if s is starting with x.val enum : string -> char Enum.tval of_enum : char Enum.t -> stringval map : (char -> char) -> string -> stringmap f s returns a string where all characters c in s have been
replaced by f c. *val strip : ?chars:string -> string -> stringval exists : string -> string -> boolexists str sub returns true if sub is a substring of str or
false otherwise.val replace_chars : (char -> string) -> string -> stringreplace_chars f s returns a string where all chars c of s have been
replaced by the string returned by f c.val replace : str:string -> sub:string -> by:string -> bool * stringreplace ~str ~sub ~by returns a tuple constisting of a boolean
and a string where the first occurrence of the string sub
within str has been replaced by the string by. The boolean
is true if a subtitution has taken place.val length : string -> intval get : string -> int -> charval set : string -> int -> char -> unitval create : int -> stringval make : int -> char -> stringval copy : string -> stringval sub : string -> int -> int -> stringval fill : string -> int -> int -> char -> unitval blit : string -> int -> string -> int -> int -> unitval concat : string -> string list -> stringval iter : (char -> unit) -> string -> unitval escaped : string -> stringval index : string -> char -> intval rindex : string -> char -> intval index_from : string -> int -> char -> intval rindex_from : string -> int -> char -> intval contains : string -> char -> boolval contains_from : string -> int -> char -> boolval rcontains_from : string -> int -> char -> boolval uppercase : string -> stringval lowercase : string -> stringval capitalize : string -> stringval uncapitalize : string -> stringtypet =string
val compare : t -> t -> int