8
let of_seq g = Buffer.contents (Stdcompat__buffer.of_seq g)
10
let to_seq s = Stdcompat__tools.vec_to_seq length unsafe_get s
12
let to_seqi s = Stdcompat__tools.vec_to_seqi length unsafe_get s
16
let lowercase_ascii = lowercase
18
let uppercase_ascii = uppercase
20
let capitalize_ascii = capitalize
22
let uncapitalize_ascii = uncapitalize
24
let equal : t -> t -> bool = ( = )
26
let split_on_char ~sep s =
27
let previous_index = ref (length s) in
29
for i = length s - 1 downto 0 do
30
if unsafe_get s i = sep then
32
accu := sub s (i + 1) (!previous_index - i - 1) :: !accu;
36
sub s 0 !previous_index :: !accu
39
Stdcompat__tools.option_find (index s) c
42
Stdcompat__tools.option_find (rindex s) c
44
let index_from_opt s i c =
45
Stdcompat__tools.option_find (index_from s i) c
47
let rindex_from_opt s i c =
48
Stdcompat__tools.option_find (rindex_from s i) c
60
init (length s) (fun i -> f i (unsafe_get s i))
65
for i = 0 to length s - 1 do
70
init (length s) (fun i -> f (unsafe_get s i))
73
Stdcompat__string.trim s
77
let compare : t -> t -> int = compare