MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / UTF8InPlaceLower

Function UTF8InPlaceLower

Source/Utility/strings.cpp:127–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void UTF8InPlaceLower(char* arr) {
128 for (unsigned i = 0; i < strlen(arr); i++) {
129 // A to Z in unicode, this is all the letters in the world, right?
130 if (arr[i] >= 0x41 && arr[i] <= 0x5A) {
131 arr[i] = arr[i] + 0x20;
132 } else {
133 arr[i] = arr[i];
134 }
135 }
136}
137
138int UTF8ToUpper(char* out, size_t outsize, const char* in) {
139 // We should be using the ICU lib for this, but good god, it's massive and difficult,

Callers 1

InitKeyTranslatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected