patterns

Iterator to isolate text elements.

Split the provided array wherever a pattern instance is found, and return the resultant segments. Pattern are excluded from each of the segments, and an optional sub argument enables replacement.

foreach (segment; patterns ("one, two, three", ", "))
         ...
patterns
(
T
)
(
T[] src
,,
T[] sub = null
)

Meta