HPCToolkit
StrUtil.cpp File Reference
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <cstring>
#include <errno.h>
#include <stdint.h>
#include <include/gcc-attr.h>
#include "StrUtil.hpp"
#include "diagnostics.h"
Include dependency graph for StrUtil.cpp:

Go to the source code of this file.

Namespaces

 StrUtil
 

Macros

#define __STDC_FORMAT_MACROS
 

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

Variables

static char StrUtil::buf [32]
 

Macro Definition Documentation

◆ __STDC_FORMAT_MACROS

#define __STDC_FORMAT_MACROS

Definition at line 76 of file StrUtil.cpp.