Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to detect an alphanumeric Unicode symbol?

I have a Unicode string consisting of letters, digits and punctuation marks. Ho can I detect characters that are digits and letters (not necessarily ASCII) with a C++ standard library or Win32 API?

like image 906
sharptooth Avatar asked Nov 28 '22 12:11

sharptooth


2 Answers

Another option is the Win32 API call GetStringTypeW()

like image 44
Nemanja Trifunovic Avatar answered Dec 01 '22 03:12

Nemanja Trifunovic


iswdigit(), iswalpha() and iswalnum() are the functions you are looking for.

Cheers !

like image 163
ralphtheninja Avatar answered Dec 01 '22 03:12

ralphtheninja