SearchFruct.tokens

Returns a foreach() iterator which exposes text segments between all matches within the given content. Substitution text is also injected in place of each match, and null can be used to indicate removal instead:

char[] result;

auto match = search ("foo");
foreach (token; match.tokens("$foo&&foo*", "bar"))
result ~= token;
assert (result == "$bar&&bar*");

This mechanism avoids internal heap activity

struct SearchFruct
return
Substitute
tokens

Meta