#include <algorithm>
#include <iostream>
#include <locale>
#include <string>
#include <vector>
int main() {
std::vector<std::string> strings{
"This is a test",
"this is a test",
"Cats",
"cats",
"this thing"};
std::sort(strings.begin(), strings.end(), std::locale("en_US.UTF8"));
for (auto const& s: strings) std::cout << s << std::endl;
return 0;
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bG9jYWxlPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgoKaW50IG1haW4oKSB7CglzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gc3RyaW5nc3sKCQkiVGhpcyBpcyBhIHRlc3QiLAogICAgICAgICJ0aGlzIGlzIGEgdGVzdCIsCiAgICAgICAgIkNhdHMiLAogICAgICAgICJjYXRzIiwKICAgICAgICAidGhpcyB0aGluZyJ9OwogICAgc3RkOjpzb3J0KHN0cmluZ3MuYmVnaW4oKSwgc3RyaW5ncy5lbmQoKSwgc3RkOjpsb2NhbGUoImVuX1VTLlVURjgiKSk7CiAgICBmb3IgKGF1dG8gY29uc3QmIHM6IHN0cmluZ3MpIHN0ZDo6Y291dCA8PCBzIDw8IHN0ZDo6ZW5kbDsKICAgIHJldHVybiAwOwp9