fork(2) download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <locale>
  4. #include <string>
  5. #include <vector>
  6.  
  7. int main() {
  8. std::vector<std::string> strings{
  9. "This is a test",
  10. "this is a test",
  11. "Cats",
  12. "cats",
  13. "this thing"};
  14. std::sort(strings.begin(), strings.end(), std::locale("en_US.UTF8"));
  15. for (auto const& s: strings) std::cout << s << std::endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 5032KB
stdin
Standard input is empty
stdout
cats
Cats
this is a test
This is a test
this thing