Removing whitespace duplicates

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 20 13:29:34 PDT 2014


On Monday, 20 October 2014 at 20:27:19 UTC, Nordlöw wrote:
> line.strip.splitter!isWhite.joiner("_").to!string

Doh, that was too easy:

line.strip.splitter!isWhite.filter!(a => 
!a.empty).joiner(lineSeparator).to!S;

Sorry, for being lazy ;)


More information about the Digitalmars-d-learn mailing list