HPCToolkit
StrUtil Namespace Reference

Functions

void tokenize_char (const std::string &tokenstr, const char *delim, std::vector< std::string > &tokenvec)
 
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)
 
long toLong (const char *str, unsigned *endidx)
 
uint64_t toUInt64 (const char *str, unsigned *endidx)
 
double toDbl (const char *str, unsigned *endidx)
 
string toStr (const int x, int base)
 
string toStr (const unsigned x, int base)
 
string toStr (const int64_t x, int base)
 
string toStr (const uint64_t x, int base)
 
string toStr (const void *x, int GCC_ATTR_UNUSED base)
 
string toStr (const double x, const char *format)
 
std::string join (const std::vector< std::string > &tokenvec, const char *delim, size_t begIdx, size_t endIdx)
 
long toLong (const std::string &str, unsigned *endidx=NULL)
 
uint64_t toUInt64 (const std::string &str, unsigned *endidx=NULL)
 
double toDbl (const std::string &str, unsigned *endidx=NULL)
 
std::string toStr (const void *x, int base=16)
 

Variables

static char buf [32]
 

Function Documentation

◆ join() [1/2]

std::string StrUtil::join ( const std::vector< std::string > &  tokenvec,
const char *  delim,
size_t  begIdx,
size_t  endIdx 
)

◆ join() [2/2]

string StrUtil::join ( const std::vector< string > &  tokenvec,
const char *  delim,
size_t  begIdx,
size_t  endIdx 
)

Definition at line 144 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ toDbl() [1/2]

double StrUtil::toDbl ( const std::string &  str,
unsigned *  endidx = NULL 
)
inline

Definition at line 150 of file StrUtil.hpp.

Here is the call graph for this function:

◆ toDbl() [2/2]

double StrUtil::toDbl ( const char *  str,
unsigned *  endidx 
)

Definition at line 213 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ tokenize_char()

void StrUtil::tokenize_char ( const std::string &  tokenstr,
const char *  delim,
std::vector< std::string > &  tokenvec 
)

Definition at line 101 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ tokenize_str()

void StrUtil::tokenize_str ( const std::string &  tokenstr,
const char *  delim,
std::vector< std::string > &  tokenvec 
)

Definition at line 122 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ toLong() [1/2]

long StrUtil::toLong ( const std::string &  str,
unsigned *  endidx = NULL 
)
inline

Definition at line 130 of file StrUtil.hpp.

Here is the call graph for this function:

◆ toLong() [2/2]

long StrUtil::toLong ( const char *  str,
unsigned *  endidx 
)

Definition at line 165 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ toStr() [1/7]

std::string StrUtil::toStr ( const void *  x,
int  base = 16 
)

◆ toStr() [2/7]

std::string StrUtil::toStr ( const int  x,
int  base 
)

Definition at line 243 of file StrUtil.cpp.

Here is the caller graph for this function:

◆ toStr() [3/7]

std::string StrUtil::toStr ( const unsigned  x,
int  base 
)

Definition at line 262 of file StrUtil.cpp.

◆ toStr() [4/7]

std::string StrUtil::toStr ( const int64_t  x,
int  base 
)

Definition at line 289 of file StrUtil.cpp.

◆ toStr() [5/7]

std::string StrUtil::toStr ( const uint64_t  x,
int  base 
)

Definition at line 312 of file StrUtil.cpp.

◆ toStr() [6/7]

string StrUtil::toStr ( const void *  x,
int GCC_ATTR_UNUSED  base 
)

Definition at line 335 of file StrUtil.cpp.

◆ toStr() [7/7]

std::string StrUtil::toStr ( const double  x,
const char *  format 
)

Definition at line 343 of file StrUtil.cpp.

◆ toUInt64() [1/2]

uint64_t StrUtil::toUInt64 ( const std::string &  str,
unsigned *  endidx = NULL 
)
inline

Definition at line 140 of file StrUtil.hpp.

Here is the call graph for this function:

◆ toUInt64() [2/2]

uint64_t StrUtil::toUInt64 ( const char *  str,
unsigned *  endidx 
)

Definition at line 189 of file StrUtil.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ buf

char StrUtil::buf[32]
static

Definition at line 240 of file StrUtil.cpp.