remove

Removes all instances of match from source.

TODO: merge with filter

Template params: T = type of array element

  1. T[] remove(T[] source, T[] match, Buffer!(T) result)
    T[]
    remove
    (
    T
    )
    (
    in T[] source
    ,
    in T[] match
    ,
    ref Buffer!(T) result
    )
  2. T[] remove(T[] source, T[] match, T[] result)

Parameters

match T[]

pattern to remove from source array

result Buffer!(T)

buffer to write resulting array to

Return Value

Type: T[]

result

Examples

Buffer!(char) result;
remove("aaabbbaaa"[], "bbb"[], result);
test!("==")(result[], "aaaaaa"[]);

Meta