1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms.

This commit is contained in:
bruvzg
2020-07-27 13:43:20 +03:00
parent 0864f12f0d
commit 80b8eff6aa
94 changed files with 4889 additions and 1686 deletions

View File

@@ -49,7 +49,7 @@ int sfind(const String &p_text, int p_from) {
return -1;
}
const CharType *src = p_text.c_str();
const char32_t *src = p_text.get_data();
for (int i = p_from; i <= (len - src_len); i++) {
bool found = true;
@@ -64,7 +64,7 @@ int sfind(const String &p_text, int p_from) {
found = src[read_pos] == '%';
break;
case 1: {
CharType c = src[read_pos];
char32_t c = src[read_pos];
found = src[read_pos] == 's' || (c >= '0' && c <= '4');
break;
}
@@ -121,7 +121,7 @@ String sformat(const String &p_text, const Variant &p1, const Variant &p2, const
int result = 0;
while ((result = sfind(p_text, search_from)) >= 0) {
CharType c = p_text[result + 1];
char32_t c = p_text[result + 1];
int req_index = (c == 's' ? findex++ : c - '0');