Range Type

Janice Caron caron800 at googlemail.com
Mon Mar 24 04:25:18 PDT 2008


This may be stating the obvious, but if we had built-in range types,
Stephen's slicing problem could be solved with

    int..int f(const(char)[] s)
    {
        return X..Y;
    }

and at the call site

   s = s[f(s)];



More information about the Digitalmars-d mailing list