StringSearch.split

Splits str into at most n slices on each occurrence of any character in delims. collapse indicates whether to collapse consecutive occurrences to a single one to prevent producing empty slices.

  1. TElem[] split(TElem[] slices, TElem str, Char delim, uint n, bool collapse)
  2. TElem[] split(TElem[] slices, TElem str, Char[] delims, uint n, bool collapse)
    struct StringSearch(bool wide_char = false)
    static
    TElem[]
    split
    (
    TElem
    )
    (
    ref TElem[] slices
    ,
    TElem str
    ,,
    uint n = 0
    ,
    bool collapse = false
    )

Parameters

slices TElem[]

destination array of slices

str TElem

input string

delims Char[]

delimiter character

n uint

maximum number of slices; set to 0 to indicate no limit

collapse bool

set to true to collapse consecutive occurrences to prevent producing empty "slices"

Meta