py: Rename some unichar functions for consistency.
This commit is contained in:
parent
89755ae67f
commit
c59af52e84
10
py/unicode.c
10
py/unicode.c
|
@ -94,28 +94,28 @@ bool unichar_isxdigit(unichar c) {
|
|||
}
|
||||
|
||||
/*
|
||||
bool char_is_alpha_or_digit(unichar c) {
|
||||
bool unichar_is_alpha_or_digit(unichar c) {
|
||||
return c < 128 && (attr[c] & (FL_ALPHA | FL_DIGIT)) != 0;
|
||||
}
|
||||
*/
|
||||
|
||||
bool char_is_upper(unichar c) {
|
||||
bool unichar_isupper(unichar c) {
|
||||
return c < 128 && (attr[c] & FL_UPPER) != 0;
|
||||
}
|
||||
|
||||
bool char_is_lower(unichar c) {
|
||||
bool unichar_islower(unichar c) {
|
||||
return c < 128 && (attr[c] & FL_LOWER) != 0;
|
||||
}
|
||||
|
||||
unichar unichar_tolower(unichar c) {
|
||||
if (char_is_upper(c)) {
|
||||
if (unichar_isupper(c)) {
|
||||
return c + 0x20;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
unichar unichar_toupper(unichar c) {
|
||||
if (char_is_lower(c)) {
|
||||
if (unichar_islower(c)) {
|
||||
return c - 0x20;
|
||||
}
|
||||
return c;
|
||||
|
|
Loading…
Reference in New Issue