Logo

Programming-Idioms

History of Idiom 49 > diff from v5 to v6

Edit summary for version 6 by :

Version 5

2015-08-19, 15:13:20

Version 6

2015-08-20, 17:20:37

Idiom #49 Split a space-separated string

Build list chunks consisting in substrings of input string s, separated by one or more space characters.

Idiom #49 Split a space-separated string

Build list chunks consisting in substrings of input string s, separated by one or more space characters.

Imports
import std.range;
Code
auto chunks = s.splitter;
Comments bubble
splitter is lazily evaluated, and does not copy anything.