range (or the words of s).S[] split(S)(S s) if (isSomeString!S) @safe pureEagerly splits range into an array, using sep as the delimiter.
When no delimiter is provided, strings are split into an array of words, using whitespace as delimiter. Runs of whitespace are merged together (no empty words are produced).
The range must be a forward range. The separator can be a value of the same type as the elements in range or it can be another forward range.
s | the string to split by word if no separator is given |
range | the range to split |
sep | a value of the same type as the elements of range or another |
isTerminator | a predicate that splits the range when it returns true. |
range (or the words of s).auto split(Range, Separator)(Range range, Separator sep) if (isForwardRange!Range && (
is(typeof(ElementType!Range.init == Separator.init)) ||
is(typeof(ElementType!Range.init == ElementType!Separator.init)) && isForwardRange!Separator
))ditto