Alec Flett wrote:
> I'm trying to break string's dependency on unicharutil and other i18n
> libraries like uconv. The problem I'm running into is that the string
> library (both new and obsolete) provides routines dealing with case,
> such as ToUpper(), ToLower() and CaseInsensitiveFindInReadable(). These
> routines require the use of the i18n libraries (specifically,
> nsICaseConversion) to do figure out what the upper-case of a particular
> unicode character is.
Since PRUnichar*'s are just wchar_t*'s, can't you convert to multibyte
string using libc wcstombs, walk through the char* converting each char
using toupper and tolower libc calls then convert back using mbstowcs?
--pete