RFC: Case-Insensitive Strings (And usually they really do *have*case)

Michel Fortin michel.fortin at michelf.com
Mon Jan 10 19:15:08 PST 2011


On 2011-01-10 17:00:40 -0500, "Nick Sabalausky" <a at a.a> said:

> Actually, what probably should be stored is a *normalized* folding-case
> version of the string, because then (if I understand correctly) memcmp could
> be used. I don't think memcpy technically works on non-ASCII (unless it's in
> normalized form).

Actually, what would be compatible with Unicode collation is probably 
an array of collation elements. This would also make it useful to sort 
case-insensitively, not just testing for equality.

Details (perhaps too much details):
<http://unicode.org/reports/tr10/>


> In any case, Phobos doesn't currently handle any of that stuff at all, so my
> case-insensitive string type wouldn't be taking things backwards in that
> regard.

Probably not.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list