Kxclib.String
include module type of Stdlib.String
val to_seq : t -> char Stdlib.Seq.t
val to_seqi : t -> (int * char) Stdlib.Seq.t
val of_seq : char Stdlib.Seq.t -> t
val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode
val is_valid_utf_8 : t -> bool
val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode
val is_valid_utf_16be : t -> bool
val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode
val is_valid_utf_16le : t -> bool
val hash : t -> int
val seeded_hash : int -> t -> int
partition_opt n s
returns None
if n
is greater than the length of s
or Some (s1, s2)
where s = s1^s2 && n = length s1
otherwise
partition n s
returns Some (s1, s2)
where s = s1^s2 && n = length s1
.
Invalid_argument
will be thrown if n
is greater than the length of s
empty_trimmed str
returns true when str is of zero length after being trimmed
chop_prefix p s
returns s
minus the prefix p
wrapped in Some
, or None
if s
does not start with p
starts_with p s
returns whether s
starts with a substring of p
chop_prefix p s
returns s
minus the suffix p
wrapped in Some
, or None
if s
does not end with p
val to_list : t -> char list
val of_list : char list -> t
val of_array : char array -> t