StringSearch.splitCollapse

Splits str 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[] splitCollapse(TElem[] slices, TElem str, Char delim, uint n)
  2. TElem[] splitCollapse(TElem[] slices, TElem str, Char[] delim, uint n)
    struct StringSearch(bool wide_char = false)
    static
    TElem[]
    splitCollapse
    (
    TElem
    )
    (
    ref TElem[] slices
    ,
    in TElem str
    ,
    in Char[] delim
    ,
    uint n = 0
    )

Parameters

str TElem

input string

delim Char[]

delimiter character

slices TElem[]

destination array of slices

n uint

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

Return Value

Type: TElem[]

the resulting slices

Meta