Why string alias is invariant ?
Janice Caron
caron800 at googlemail.com
Thu Jan 31 12:34:35 PST 2008
On 1/31/08, Sean Kelly <sean at f4.ca> wrote:
> > and the duplication goes away.
>
> It does? I didn't think tolower would modify a string in place.
OK - /one/ of the duplications goes away.
It's not possible, even in principle, to lowercase a char[] in place,
because a char[] by definition is an array of UTF-8 code units, /not/
an array of characters. Lowercasing a character may result in the
length of its UTF-8 sequence changing. If the length increases, you're
screwed.
You can lowercase a dchar[] in place, but not a char[].
More information about the Digitalmars-d
mailing list