When you write your case-insensitive compare function....
'0-9' are ascii 48-57
'a-z' are ascii 97-172
'A-Z' are ascii 65-90

by masking off the 32 bit, you make all letters upper case while moving
the numbers to the range 16-25. Now you want the numbers to come after
the letters, so you could toggle the 64 bit and get:
'0-9' = 80-89
'A-Z' = 1-26
'a-z' = 1-26

So if c is an ascii character, x = ((c & ~32)^64) would be a value that
compares with the properties you seek. You'll still need to write a
function to compare strings while using this character mapping.

Hope it helps,
Paul



_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to