alby at exln.com
Fri Dec 6 05:56:41 CST 2002
your code should work fine.
The beauty of Unicode characters is that you are guaranteed that their size
is always the same (well, this would be correct if you use 32-bit Unicode
characters, aka UCS-4; but everybody settles for UCS-2, that uses 16-bit
characters, and works for almost all languages in the world).
So, once you have a WCHAR (=unsigned int), you can use the ++ and --
operator and you know you are going to the next or previous character; on
the other hand, using ++ and -- on a char* buffer doesn't guarantee you
that you are seeing the next character, as you can be looking at the second
byte of a multi-byte character.
This is the reason why string manipulation routines should be done in
More information about the wine-devel