StringSearch.splitCollapse

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

Parameters

slices TElem[]

array to put the resulting slices

str TElem

input string

delim Char

delimiter character

n uint

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

Return Value

Type: TElem[]

the resulting slices

Meta