package containers

  1. Overview
  2. Docs
val list_ : by:string -> string -> (string * int * int) list

split the given string along the given separator by. Should only be used with very small separators, otherwise use Containers_string.KMP.

  • returns

    a list of (index,length) of substrings of s that are separated by by. String.sub can then be used to actually extract the slice.

  • raises Failure

    if by = ""

val gen : by:string -> string -> (string * int * int) gen
val seq : by:string -> string -> (string * int * int) sequence
val klist : by:string -> string -> (string * int * int) klist
Copying functions

Those split functions actually copy the substrings, which can be more convenient but less efficient in general

val list_cpy : by:string -> string -> string list
val gen_cpy : by:string -> string -> string gen
val seq_cpy : by:string -> string -> string sequence
val klist_cpy : by:string -> string -> string klist