-
-
Save Ilgrim/b2a51523002d1dff2947c287ed0bafef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
int main() { | |
using std::string; | |
std::string umlauts_small = u8"äöü"; | |
std::string umlauts_capital = u8"ÄÖÜ"; | |
auto foo = umlauts_small + "|" + umlauts_capital; | |
// ... | |
auto middle = std::find(foo.begin(), foo.end(), '|'); | |
std::string part1{foo.begin(), middle}; // "aou" | |
std::string part2{middle+1, foo.end()}; // „ÄÖÜ“ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment