34 sscanf(str.c_str(),
"%d", &ret);
47 start = curr =
static_cast<int>(str.find_first_not_of(delim));
50 if(str[curr] == group) {
51 curr =
static_cast<int>(str.find_first_of(group, curr+1));
52 if((
size_t)curr == std::string::npos) {
56 std::string token = str.substr(start+1, curr-start-1);
59 }
else if(str[curr] == delim) {
60 if(str[curr-1] != delim && str[curr-1] != group) {
61 std::string token = str.substr(start, curr-start);
69 if(tokens.size() == 0) {
74 if(str[curr-1] != delim && str[curr-1] != group) {
75 std::string token = str.substr(start, curr - 1);
int32_t makeInt32(const std::string &str)
std::vector< int32_t > IntVector
IntVector tokenize(const std::string &str, char delim, char group)