On Wednesday, 22 October 2014 at 19:00:36 UTC, Nordlöw wrote:
On Tuesday, 21 October 2014 at 08:04:13 UTC, bearophile wrote:
If your text is ASCII, then there is std.ascii.whitespace that can be given as argument to std.string.tr.

Bye,
bearophile

http://dlang.org/phobos/std_ascii.html#.whitespace

is of string but

std.string.tr needs [string] as argument.

How does that work?

string a = "test \t \t test";

writeln(a.tr(std.ascii.whitespace,"_","s"));

Reply via email to