Specification of what to do with empty blocks, as in split ~by:"-" "-a-b-".
{first=false; last=false} will return ""; "a"; "b"; ""{first=true; last=false} will return "a"; "b" ""{first=false; last=true} will return ""; "a"; "b"{first=true; last=true} will return "a"; "b"The default value of all remaining functions is Drop_none.
val list_ : ?drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) listSplit the given string along the given separator by. Should only
be used with very small separators, otherwise
use Containers_string.KMP.
(s,index,length) that are
separated by by. String.sub can then be used to actually extract
a string from the slice.by = "".val gen : ?drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) genval seq : ?drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) sequenceval klist : ?drop:drop_if_empty ‑> by:string ‑> string ‑> (string * int * int) klistThose split functions actually copy the substrings, which can be more convenient but less efficient in general.
val list_cpy : ?drop:drop_if_empty ‑> by:string ‑> string ‑> string listval gen_cpy : ?drop:drop_if_empty ‑> by:string ‑> string ‑> string genval seq_cpy : ?drop:drop_if_empty ‑> by:string ‑> string ‑> string sequenceval klist_cpy : ?drop:drop_if_empty ‑> by:string ‑> string ‑> string klistval left : by:string ‑> string ‑> (string * string) optionSplit on the first occurrence of by from the leftmost part of
the string.
val left_exn : by:string ‑> string ‑> string * stringSplit on the first occurrence of by from the leftmost part of the string.
by is not part of the string.