blob: 5e3966ce8628f194d24df98b025148cabc2be36b (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Zerlegt s anhand aller Zeichen in delim.
vector<string> split(string &s, string delim) {
vector<string> result; char *token;
token = strtok((char*)s.c_str(), (char*)delim.c_str());
while (token != NULL) {
result.push_back(string(token));
token = strtok(NULL, (char*)delim.c_str());
}
return result;
}
|