Hey,

I'm struggling to find a way to achieve this. I've looked through std.algorithm but didn't find anything.. Maybe I'm blind.

What I would like to do is filter out all spaces in a string and change the front letter to lower case:

    string m = "My Capital String";
    string lower = m
        .filter!(c => c != ' ')
.<executeAt>!(0, c => c.toLower) // executeAt does not exist
        .array.to!string;
    assert(lower == "myCapitalString");

or sth like

    m.filter!(...)
        .map!((element, int index) {
            if (index == 0)
                return element.toLower;
            else
break; // stop since we are done manipulating range
        });

Anyway to do this?

Reply via email to