HPCToolkit
StrUtil.hpp File Reference
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <inttypes.h>
Include dependency graph for StrUtil.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 StrUtil
 

Functions

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