the Result Type

bearophile bearophileHUGS at lycos.com
Sun Dec 8 03:07:52 PST 2013


Ali Çehreli:

> When you eagerly need an actual array of the elements, call 
> std.array.array on Result:
>
> import std.array;
> import std.algorithm;
>
> void main()
> {
>     auto input = "hello world";
>     auto splittedWords = input.splitter(' ').array;

Or just use the eager split() function.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list