Removing whitespace duplicates

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 21 01:04:12 PDT 2014


Nordlöw:

> It would be nice to have a lambda-variant of std.string.tr to 
> call like
>
> x.tr!isWhite(['_'])

If your text is ASCII, then there is std.ascii.whitespace that 
can be given as argument to std.string.tr.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list