py/unicode: Add unichar_isalnum().

This commit is contained in:
Yonatan Goldschmidt
2019-12-14 14:38:15 +02:00
committed by Damien George
parent bc5c993adf
commit df5c3bd976
2 changed files with 5 additions and 0 deletions

View File

@@ -140,6 +140,10 @@ bool unichar_isident(unichar c) {
return c < 128 && ((attr[c] & (FL_ALPHA | FL_DIGIT)) != 0 || c == '_');
}
bool unichar_isalnum(unichar c) {
return c < 128 && ((attr[c] & (FL_ALPHA | FL_DIGIT)) != 0);
}
bool unichar_isupper(unichar c) {
return c < 128 && (attr[c] & FL_UPPER) != 0;
}