Fix upper/lower case convertion for characters >= 0x80
(cherry picked from commit ecb071b221
)
This commit is contained in:
parent
f302888a47
commit
0572b52ba1
|
@ -885,8 +885,8 @@ String String::to_upper() const {
|
||||||
|
|
||||||
for (int i = 0; i < upper.size(); i++) {
|
for (int i = 0; i < upper.size(); i++) {
|
||||||
|
|
||||||
const char s = upper[i];
|
const CharType s = upper[i];
|
||||||
const char t = _find_upper(s);
|
const CharType t = _find_upper(s);
|
||||||
if (s != t) // avoid copy on write
|
if (s != t) // avoid copy on write
|
||||||
upper[i] = t;
|
upper[i] = t;
|
||||||
}
|
}
|
||||||
|
@ -900,8 +900,8 @@ String String::to_lower() const {
|
||||||
|
|
||||||
for (int i = 0; i < lower.size(); i++) {
|
for (int i = 0; i < lower.size(); i++) {
|
||||||
|
|
||||||
const char s = lower[i];
|
const CharType s = lower[i];
|
||||||
const char t = _find_lower(s);
|
const CharType t = _find_lower(s);
|
||||||
if (s != t) // avoid copy on write
|
if (s != t) // avoid copy on write
|
||||||
lower[i] = t;
|
lower[i] = t;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue