std.stringbuffer

Janice Caron caron800 at googlemail.com
Wed Apr 30 23:39:05 PDT 2008


2008/5/1 Frits van Bommel <fvbommel at remwovexcapss.nl>:
>  Actually, you can't uppercase UTF-16 and UTF-32 in-place either if you want
> to be entirely correct. For example: \u00df ("ß") --> \u0053 \u0053 ("SS").

I know about that, and for the future I have plans for a proper
unicode lib with normalisation, full casing, etc. However - none of
that is the job of std.string.toUpper() or std.string.toLower(). These
functions only need to /simple/ casing, not /full/ casing, and in
/simple/ casing, one dchar always maps to one dchar. In particular
'\u00DF' maps to '\u00DF'.

In full casing, toLower('\u1E9E') (LATIN CAPITAL LETTER SHARP S) is
'\u00DF' (LATIN SMALL LETTER SHARP S), but the converse is not true.
What fun! :-). But full casing is not the concern of std.string (nor
of std.stringbuffer, or whatever we end up calling it), so we don't
need to worry about that here.




More information about the Digitalmars-d mailing list