void _split(const StaticString &str, char sep, vector<OutputString> &output) { string::size_type start, pos; start = 0; output.clear(); while ((pos = str.find(sep, start)) != string::npos) { output.push_back(str.substr(start, pos - start)); start = pos + 1; } output.push_back(str.substr(start)); }
static void _splitIncludeSep(const StaticString &str, char sep, vector<OutputString> &output) { output.clear(); if (!str.empty()) { string::size_type start, pos; start = 0; while ((pos = str.find(sep, start)) != string::npos) { output.push_back(str.substr(start, pos - start + 1)); start = pos + 1; } if (start != str.size()) { output.push_back(str.substr(start)); } } }
bool containsSubstring(const StaticString &str, const StaticString &substr) { return str.find(substr) != string::npos; }