63 #ifndef support_StrUtil_hpp 64 #define support_StrUtil_hpp 97 std::vector<std::string>& tokenvec);
100 tokenize_str(
const std::string& tokenstr,
const char* delim,
101 std::vector<std::string>& tokenvec);
111 join(
const std::vector<std::string>& tokenvec,
const char* delim,
112 size_t begIdx,
size_t endIdx);
127 toLong(
const char* str,
unsigned* endidx =
NULL);
132 return toLong(str.c_str(), endidx);
142 return toUInt64(str.c_str(), endidx);
147 toDbl(
const char* str,
unsigned* endidx =
NULL);
152 return toDbl(str.c_str(), endidx);
162 toStr(
const int x,
int base = 10);
165 toStr(
const unsigned x,
int base = 10);
168 toStr(
const int64_t x,
int base = 10);
171 toStr(
const uint64_t x,
int base = 10);
174 toStr(
const void* x,
int base = 16);
177 toStr(
const double x,
const char* format =
"%.3f");
183 #endif // support_StrUtil_hpp double toDbl(const char *str, unsigned *endidx)
uint64_t toUInt64(const char *str, unsigned *endidx)
string toStr(const int x, int base)
long toLong(const char *str, unsigned *endidx)
void tokenize_str(const std::string &tokenstr, const char *delim, std::vector< std::string > &tokenvec)
string join(const std::vector< string > &tokenvec, const char *delim, size_t begIdx, size_t endIdx)
void tokenize_char(const std::string &tokenstr, const char *delim, std::vector< std::string > &tokenvec)