Type of complex expression

bearophile bearophileHUGS at lycos.com
Wed Feb 27 03:32:15 PST 2013


Lubos Pintes:

> auto a="  1 2  3   4 5   "
>   .split(" ")
>   .filter!"!a.empty"
>   .map!"to!int(a)";
> writeln(a);

better (untested):

auto a = "  1 2  3   4 5   "
          .split
          .map!(to!int)
          .writeln;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list