std.string and std.algorithm: what to do?

Benji Smith dlanguage at benjismith.net
Sat May 16 18:15:52 PDT 2009


Andrei Alexandrescu wrote:
> Yah, I defined
> 
> enum CaseSensitive { no, yes }

Minor nitpick: there are lots of different ways to canonicalize text 
before performing a comparison. Ascii case conversions are just one way.

Instead of an enum with a yes/no value, what about future-proofing it 
with something more along the lines of...

    enum CaseSensitivity {
       None, Ascii, UnicodeChar, UnicodeSurrogatePair
    }

...or something like that.

The yes/no enum will outlive its usefulness before long.

--benji



More information about the Digitalmars-d mailing list