Equivalize isLowerCase and isUpperCase behavior in all platforms #KT-46184

This commit is contained in:
Abduqodiri Qurbonzoda
2021-05-25 05:32:29 +03:00
parent 0b10f255d7
commit d934c97bf5
25 changed files with 386 additions and 75 deletions
@@ -51,17 +51,17 @@ internal fun Char.isLetterImpl(): Boolean {
}
/**
* Returns `true` if this character is a lower case letter.
* Returns `true` if this character is a lower case letter, or it has contributory property Other_Lowercase.
*/
internal fun Char.isLowerCaseImpl(): Boolean {
return getLetterType() == 1
return getLetterType() == 1 || code.isOtherLowercase()
}
/**
* Returns `true` if this character is an upper case letter.
* Returns `true` if this character is an upper case letter, or it has contributory property Other_Uppercase.
*/
internal fun Char.isUpperCaseImpl(): Boolean {
return getLetterType() == 2
return getLetterType() == 2 || code.isOtherUppercase()
}
/**