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

Function UTF8ToLower

Source/Utility/strings.cpp:157–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157string UTF8ToLower(const string& in) {
158 string out;
159 out.resize(in.size());
160 for (unsigned i = 0; i < out.size(); i++) {
161 // A to Z in unicode, this is all the letters in the world, right?
162 if (in[i] >= 0x41 && in[i] <= 0x5A) {
163 out[i] = in[i] + 0x20;
164 } else {
165 out[i] = in[i];
166 }
167 }
168 return out;
169}
170
171int UTF8ToLower(char* out, size_t outsize, const char* in) {
172 // We should be using the ICU lib for this, but good god, it's massive and difficult,

Callers 1

StringToSDLScancodeFunction · 0.85

Calls 2

resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected