Ideally I want to use something like this:
---------
import std.stdio;
import std.string;
import std.algorithm;
import std.conv;

void main()
{
        string[] ar = [" dad ", " blue "];
        writeln(typeid(ar));
        
        //ar.each(writeln);
        //ar.map!writeln;
        //ar.apply!writeln;
        
        //string[] ar_striped = ar.map!strip;
        //string[] ar_striped = ar.apply!strip;
        //string[] ar_striped = ar.each!strip;
        
        //ar_striped.each!writeln;
        //ar_striped.apply!writeln;
        //ar_striped.map!writeln;
        
        
        alias stringize = map!(to!string);
        auto sz = stringize([ 1, 2, 3, 4 ]);
        writeln(typeid(sz));
        assert(equal(sz, [ "1", "2", "3", "4" ]));
}
---------

But none of then work, any idea of how to that in D ?

Cheers !

Reply via email to