Split string by whitespace
| 20 | |
| 21 | // Split string by whitespace |
| 22 | vector<string> String::Split(const string & s) |
| 23 | { |
| 24 | if (s.empty()) |
| 25 | return vector<string>(); |
| 26 | |
| 27 | vector<string> parts; |
| 28 | istringstream iss(s); |
| 29 | while (iss && !iss.eof()) |
| 30 | { |
| 31 | string sub; |
| 32 | iss >> sub; |
| 33 | parts.emplace_back(sub); |
| 34 | } |
| 35 | return parts; |
| 36 | } |
| 37 | |
| 38 | string String::Lower(const string & str) |
| 39 | { |