Is there a cross-platform `iswalnum` function for `base::char16`?

10 views
Skip to first unread message

Anton Guryanov

unread,
Sep 26, 2016, 9:22:32 AM9/26/16
to Chromium-dev
Hi!

I want to use functions from <wctype.h>, but I can't use them with `base::char16` on all platforms, I have to convert the character to `wchar_t` before calling them.
Are there alternatives?

Brett Wilson

unread,
Sep 26, 2016, 11:48:35 AM9/26/16
to gurya...@gmail.com, Chromium-dev
Normally you would use ICU for this kind of thing. There are a lot of functions to classify character types although I don't know which ones to point you to. You might start by looking at usage in base/i18n/*.

Brett

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Anton Guryanov

unread,
Sep 26, 2016, 12:37:28 PM9/26/16
to Chromium-dev
Thanks, looks like ICU is just what I need.

понедельник, 26 сентября 2016 г., 18:48:35 UTC+3 пользователь Brett Wilson написал:
Reply all
Reply to author
Forward
0 new messages