mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Added support for building against ICU 76.1 and later
This commit is contained in:
parent
739f6d3715
commit
b50b4d9d0a
|
@ -219,20 +219,18 @@ namespace Utils
|
||||||
icu::UnicodeString iterateString {
|
icu::UnicodeString iterateString {
|
||||||
icu::UnicodeString::fromUTF8(stringArg.c_str()).toLower()};
|
icu::UnicodeString::fromUTF8(stringArg.c_str()).toLower()};
|
||||||
|
|
||||||
if (iterateString != nullptr) {
|
if (iterateString.isBogus())
|
||||||
iterator->setText(iterateString);
|
|
||||||
int32_t pos {iterator->first()};
|
|
||||||
int32_t lastPos {pos};
|
|
||||||
|
|
||||||
while (pos != icu::BreakIterator::DONE) {
|
|
||||||
iterateString.replace(lastPos, 1,
|
|
||||||
icu::UnicodeString(iterateString, pos, 1).toUpper());
|
|
||||||
pos = iterator->next();
|
|
||||||
lastPos = pos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return stringArg;
|
return stringArg;
|
||||||
|
|
||||||
|
iterator->setText(iterateString);
|
||||||
|
int32_t pos {iterator->first()};
|
||||||
|
int32_t lastPos {pos};
|
||||||
|
|
||||||
|
while (pos != icu::BreakIterator::DONE) {
|
||||||
|
iterateString.replace(lastPos, 1,
|
||||||
|
icu::UnicodeString(iterateString, pos, 1).toUpper());
|
||||||
|
pos = iterator->next();
|
||||||
|
lastPos = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string stringCapitalized;
|
std::string stringCapitalized;
|
||||||
|
|
Loading…
Reference in a new issue