| 125 | } |
| 126 | |
| 127 | void 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 | |
| 138 | int 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, |