nextSeparated

Returns the next separated word. Separators are always removed, white characters optionally.

nextSeparated
(
Range
Separators
bool strip = true
)
(
auto ref Range range
,
Separators sep
)

Examples

1 auto seps = CharMap[',', '\n'];
2 auto text = "name, âge \n Douglas, 27 \n Sophia 26";
3 assert(text.nextSeparated(seps) == "name");
4 assert(text.nextSeparated(seps) == "âge");
5 assert(text.nextSeparated(seps) == "Douglas");
6 assert(text.nextSeparated(seps) == "27");

Meta