include module type of Stdlib.String
val make : int -> char -> stringval init : int -> (int -> char) -> stringval length : string -> intval get : string -> int -> charval of_bytes : bytes -> stringval to_bytes : string -> bytesval blit : string -> int -> bytes -> int -> int -> unitval concat : string -> string list -> stringval cat : string -> string -> stringval equal : t -> t -> boolval starts_with : prefix:string -> string -> boolval ends_with : suffix:string -> string -> boolval contains_from : string -> int -> char -> boolval rcontains_from : string -> int -> char -> boolval contains : string -> char -> boolval sub : string -> int -> int -> stringval split_on_char : char -> string -> string listval map : (char -> char) -> string -> stringval mapi : (int -> char -> char) -> string -> stringval fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'accval fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'accval for_all : (char -> bool) -> string -> boolval exists : (char -> bool) -> string -> boolval trim : string -> stringval escaped : string -> stringval uppercase_ascii : string -> stringval lowercase_ascii : string -> stringval capitalize_ascii : string -> stringval uncapitalize_ascii : string -> stringval iter : (char -> unit) -> string -> unitval iteri : (int -> char -> unit) -> string -> unitval index_from : string -> int -> char -> intval index_from_opt : string -> int -> char -> int optionval rindex_from : string -> int -> char -> intval rindex_from_opt : string -> int -> char -> int optionval index : string -> char -> intval index_opt : string -> char -> int optionval rindex : string -> char -> intval rindex_opt : string -> char -> int optionval to_seq : t -> char Stdlib.Seq.tval to_seqi : t -> (int * char) Stdlib.Seq.tval of_seq : char Stdlib.Seq.t -> tval get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decodeval is_valid_utf_8 : t -> boolval get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decodeval is_valid_utf_16be : t -> boolval get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decodeval is_valid_utf_16le : t -> boolval get_uint8 : string -> int -> intval get_int8 : string -> int -> intval get_uint16_ne : string -> int -> intval get_uint16_be : string -> int -> intval get_uint16_le : string -> int -> intval get_int16_ne : string -> int -> intval get_int16_be : string -> int -> intval get_int16_le : string -> int -> intval get_int32_ne : string -> int -> int32val seeded_hash : int -> t -> intval get_int32_be : string -> int -> int32val get_int32_le : string -> int -> int32val get_int64_ne : string -> int -> int64val get_int64_be : string -> int -> int64val get_int64_le : string -> int -> int64val unsafe_get : string -> int -> charval unsafe_blit : string -> int -> bytes -> int -> int -> unitmodule Set : Stdlib.Set.S with type elt = stringHelper functions used for string manipulation.
val compare : string -> string -> intString comparison with natural ordering of numbers within strings
val to_ascii : string -> stringRemoves all non-ASCII diacritics from a string by converting them to their base letter in the Latin alphabet. Anything that is not convertible is replaced by "?"
val to_id : string -> stringLike to_ascii, but in addition replaces any non-alphanumeric character by _
val utf8_seq : string -> Stdlib.Uchar.t Stdlib.Seq.tval map_utf8 : (Stdlib.Uchar.t -> Stdlib.Uchar.t) -> string -> stringval is_uppercase_ascii : char -> boolis_uppercase c returns if c is in the set 'A'...'Z'.
val begins_with_uppercase : string -> boolbegins_with_uppercase s returns if the first letter of s is uppercase. Handles utf8. false if s is empty.
val to_snake_case : string -> stringConverts CamlCase into snake_case after removing Remove all diacritics on Latin letters.
val to_camel_case : ?capitalize:bool -> string -> stringConverts snake_case into CamlCase after removing Remove all diacritics on Latin letters.
If capitalize is false, the first letter is lowercase. Defaults to true.
val remove_prefix : prefix:string -> string -> stringremove_prefix ~prefix str returns
- if
str starts with prefix, a string s such that prefix ^ s = str - otherwise,
str unchanged
val trim_end : string -> stringLike Stdlib.String.trim, but only trims at the end of the string
val width : string -> intReturns the width of a given string in screen columns (assuming a monospace font). Useful for alignment. This takes unicode (except composite chars) and tabs into account, but not escape sequences.
val cut_at_width : string -> int -> stringReturns a string prefix of s that can fit into width screen columns. Same limitations as width.
val quote : string -> stringquote s returns the string s prefixed and suffixed by '"'. The special characters '\\', '"', '\t', '\n', '\r', '\b' and '\f' ('\x0c') present in s are also escaped using '\\'. This is expected to be compatible with JSON escaping. No utf-8 escaping takes place.
val re_split_delim : ?pos:int -> ?len:int -> Re.re -> t -> t listsplit_delim re s splits s into chunks separated by re. It yields the chunks themselves, not the separator. Occurences of the separator at the beginning or the end of the string will produce empty chunks.
Note: from Re, but not available before 1.12 -- remove once we update the dependency