42 if (offset == string::npos) {
48 lhs = s.substr(0, offset);
49 rhs = s.substr(offset + 1);
57 if (offset == string::npos) {
63 lhs = s.substr(0, offset);
64 rhs = s.substr(offset + 1);
77 if (ignore && last == first) {
79 last = s.find_first_of(token, ++first);
81 if (last == string::npos) {
82 if (first != s.size())
83 v.push_back(s.substr(first));
88 while (last != string::npos) {
89 v.push_back(s.substr(first, last - first));
92 first = s.find_first_not_of(token, last + 1);
94 if (first == string::npos)
99 last = s.find_first_of(token, first);
102 v.push_back(s.substr(first));
static void ignore(const char *expr)
bool split_last(const string &s, string &lhs, string &rhs, char c)
bool split_first(const string &s, string &lhs, string &rhs, char c)
void tokenize(vector< string > &v, const string &s, char token, bool ignore)