Suggestion to improve phobos std.string.icmp function

Lionello Lunesu lio at lunesu.remove.com
Tue Jul 18 07:48:30 PDT 2006


Hi,

Beware that using a char to index into an array can cause access 
violation if the char's negative. You'll get [-1] and such. cast it to a 
byte.

Otherwise, seems like a good optimization. Either your code, or some 
more complicate function using the tolower from std.uni. Will be tricky 
to optimize that one.

L.



More information about the Digitalmars-d mailing list