Private.String
Strings.
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
cut ~sep s
cuts s
on the left and right of the first char sep
starting from the left.
rev_cut ~sep s
cuts s
on the left and right of the first char sep
starting from the right.
starts_with ~prefix s
is true
iff prefix
is a prefix of s
. Note. Available in 4.13.
edit_distance s0 s1
is the number of single character edits (insertion, deletion, substitution) that are needed to change s0
into s1
.
suggest ~dist candidates s
are the elements of candidates
whose edit distance is the smallest to s
and at most at a distance of dist
of s
(defaults to 2
). If multiple results are returned the order of candidates
is preserved.