mirror of
https://github.com/godotengine/godot.git
synced 2025-04-01 00:41:35 +08:00
Fix upper/lower case convertion for characters >= 0x80
This commit is contained in:
parent
7478649b2f
commit
ecb071b221
@ -921,8 +921,8 @@ String String::to_upper() const {
|
||||
|
||||
for (int i = 0; i < upper.size(); i++) {
|
||||
|
||||
const char s = upper[i];
|
||||
const char t = _find_upper(s);
|
||||
const CharType s = upper[i];
|
||||
const CharType t = _find_upper(s);
|
||||
if (s != t) // avoid copy on write
|
||||
upper[i] = t;
|
||||
}
|
||||
@ -936,8 +936,8 @@ String String::to_lower() const {
|
||||
|
||||
for (int i = 0; i < lower.size(); i++) {
|
||||
|
||||
const char s = lower[i];
|
||||
const char t = _find_lower(s);
|
||||
const CharType s = lower[i];
|
||||
const CharType t = _find_lower(s);
|
||||
if (s != t) // avoid copy on write
|
||||
lower[i] = t;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user