package oasis

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Various string utilities.

Mostly inspired by extlib and batteries ExtString and BatString libraries.

  • author Sylvain Le Gall
val nsplitf : string -> (char -> bool) -> string list
val nsplit : string -> char -> string list

nsplit c s Split the string s at char c. It doesn't include the separator.

val find : what:string -> ?offset:int -> string -> int
val sub_start : string -> int -> string
val sub_end : ?offset:int -> string -> int -> string
val starts_with : what:string -> ?offset:int -> string -> bool
val strip_starts_with : what:string -> string -> string
val ends_with : what:string -> ?offset:int -> string -> bool
val strip_ends_with : what:string -> string -> string
val replace_chars : (char -> char) -> string -> string
val lowercase_ascii : string -> string
val uncapitalize_ascii : string -> string
val uppercase_ascii : string -> string
val capitalize_ascii : string -> string
val is_whitespace : char -> bool
val tokenize : ?is_whitespace:(char -> bool) -> ?tokens:string list -> string -> string list
val tokenize_genlex : ?tokens:string list -> string -> Genlex.token list
val split : string -> char -> string * string
val trim : string -> string
val fold_left : ('a -> char -> 'b) -> 'c -> string -> 'd
val contains : what:string -> string -> bool
val split_comma : string -> string list

Split a list using ',' as separator. Not exported

val split_newline : ?do_trim:bool -> string -> string list

Split a list using '\n' as separator. Not exported

val split_optional_parentheses : string -> string * string option

Split a string containing '(...)' optionally. Not exported

OCaml

Innovation. Community. Security.