ctype: return true in isupper/islower if there is a simple case mapping present

This commit is contained in:
Reece H. Dunn
2017-02-12 09:22:25 +00:00
parent e77b7c7b49
commit bd71fed013
6 changed files with 29 additions and 8 deletions
+4 -2
View File
@@ -97,7 +97,8 @@ int ucd_isgraph(codepoint_t c)
int ucd_islower(codepoint_t c)
{
return ucd_lookup_category(c) == UCD_CATEGORY_Ll;
return ucd_lookup_category(c) == UCD_CATEGORY_Ll
|| ucd_toupper(c) != c;
}
int ucd_isprint(codepoint_t c)
@@ -159,7 +160,8 @@ int ucd_isspace(codepoint_t c)
int ucd_isupper(codepoint_t c)
{
return ucd_lookup_category(c) == UCD_CATEGORY_Lu;
return ucd_lookup_category(c) == UCD_CATEGORY_Lu
|| ucd_tolower(c) != c;
}
int ucd_isxdigit(codepoint_t c)