Lines Matching defs:source
33 static std::vector<std::string> StringSplit(std::string source, const std::string &split = ",")
39 while ((pos = source.find(split)) != std::string::npos) {
41 std::string token = source.substr(0, pos);
45 source.erase(0, pos + split.length());
48 if (!source.empty()) {
49 result.push_back(source);
54 static std::vector<int> StringSplitToInt(std::string source, const std::string &split = ",")
60 while ((pos = source.find(split)) != std::string::npos) {
62 std::string token = source.substr(0, pos);
66 source.erase(0, pos + split.length());
69 if (!source.empty()) {
70 result.push_back(std::stoi(source));