module Sstring: sig .. end
Messing with strings.
val opt_of_string : string -> string option
opt_of_string s returns
None if the string if empty
(length is 0) or
Some s.
Version: 1.0

String.opt_of_string
val string_of_opt : string option -> string
string_of_opt s_opt returns the empty string if
s_opt = None or
s if
s_opt = Some s.
Version: 1.0

String.string_of_opt
val no_blanks : string -> string
no_blanks s returns the given string without any blank
characters, i.e. '\n' '\r' ' ' '\t'.
Version: 1.0

String.no_blanks
val keep_alpha_nums : string -> string
Return the given string where only alphanums char are kept.
Version: 1.0

String.keep_alpha_nums
val chop_n_char : int -> string -> string
chop_n_char n s returns the given string where characters after position n
are replaced by
"...".
Version: 1.0

String.chop_n_char
val string_of_date : ?fr:bool -> ?wday:bool -> ?hours:bool -> ?secs:bool -> float -> string
Return a string to represent the given date.
Version: 1.0

String.string_of_date
fr : is false by default but can be set to true
to get the date in french rather than in english.
wday : indicates whether do display the week day. Default is false.
hours : indicates whether do display the hour. Default is true.
secs : indicates whether do display the seconds if hours is true. Default is false.
val string_of_in_channel : Pervasives.in_channel -> string
string_of_in_channel ch reads the given channel until
the end, returning the content in the form of one string.
Author(s): Maxence Guesdon
Version: 1.0

String.string_of_in_channel
val first_sentence : ?limit:int -> string -> string
first_sentence ?limit s returns the first sentence of
s, in the limit
of
limit characters. By default, this limit is 40..
A sentence is terminated by a dot followed by a blank.
Author(s): Maxence Guesdon
Version: 1.0

String.first_sentence
val lowercase : string -> string
lowercase s lowers the case of the given string, including accentuated characters.
Author(s): Maxence Guesdon
Version: 1.0

String.lowercase
val capitalize_name : string -> string
capitalize_name s lowers the case of the given string (but not the accents)
and uppers the letters at the beginning of the words.
Author(s): Maxence Guesdon
Version: 1.0
The following assertions hold:
capitalize_name "maxence guesdon" = "Maxence Guesdon"
capitalize_name "maxENce gUesdon" = "Maxence Guesdon"
capitalize_name "roberto di cosmo" = "Roberto di Cosmo"
capitalize_name "henri de la motte" = "Henri de La Motte"

String.capitalize_name
val split_string : ?keep_empty:bool -> string -> char list -> string list
Separate the given string according to the given list of characters.
Author(s): Maxence Guesdon
Version: 1.1

String.split_string
keep_empty : is false by default. If set to true,
the empty strings between separators are kept.
val count_char : string -> char -> int
count_char s c count the number to occurences of character
c in string
s.
Author(s): Maxence Guesdon
Version: 1.0

String.count_char
val is_prefix : string -> string -> bool
is_prefix pattern s returns true if string
s begins with
pattern.
Author(s): Maxence Guesdon
Version: 1.0

String.is_prefix
val replace_in_string : pat:string -> subs:string -> s:string -> string
replace_in_string ~pat ~subs ~s replaces all occurences of
pattern
pat by
subs in string
s.
Author(s): Maxence Guesdon
Version: 1.0

String.replace_in_string
val strip_string : string -> string
strip_string s removes all leading and trailing spaces from the given string.
Author(s): Maxence Guesdon
Version: 1.0

String.strip_string