Puzzle 8-12-08 (Spoiler)

bearophile bearophileHUGS at lycos.com
Wed Aug 13 04:08:18 PDT 2008


Well, with my libs too (xsplit is lazy):

import d.string, d.func;

void main() {
    string s = " My name  is Amit Agarwal 0".dup;

    s.reverse;
    foreach (part; s.xsplit())
        part.reverse;

    putr(repr(s));
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list