VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
StringUtilities

Classes

class  StringUtil
 

Macros

#define SSTR(x)   static_cast<std::ostringstream &>((std::ostringstream() << std::dec << x)).str()
 

Functions

std::vector< std::stringsplit (const std::string &str, char delim=' ')
 
static std::string StringUtil::findAndReplace (const std::string &source, const std::string &find, const std::string &replace)
 
static std::string StringUtil::makeUpper (const std::string &instring)
 
static std::string StringUtil::makeLower (const std::string &instring)
 
static bool StringUtil::contains (const std::string &source, const char *find)
 
static std::string StringUtil::pad (const std::string &input, char pad, int length)
 
static std::string StringUtil::trim (const std::string &input, const std::string &trim=std::string(" \t\n"))
 
static int StringUtil::toInt (const std::string &input)
 
static float StringUtil::toFloat (const std::string &input)
 
static double StringUtil::toDouble (const std::string &input)
 
static bool StringUtil::toBool (const std::string &input)
 
static std::vector< std::string > StringUtil::split (const std::string &input, const std::string &delim=" ")
 
static std::vector< intStringUtil::toIntVector (const std::string &s)
 
static std::vector< unsigned intStringUtil::toUintVector (const std::string &s)
 
static std::vector< boolStringUtil::toBoolVector (const std::string &s)
 
static std::vector< std::string > StringUtil::toStringVector (const std::string &s)
 
static std::vector< doubleStringUtil::toDoubleVector (const std::string &s)
 
template<typename T >
static std::string StringUtil::toString (const T &t)
 
static bool StringUtil::endsWith (const std::string &input, const std::string &end)
 

Detailed Description

Author
Konstantin Kutscher, Soeren Textor, Sebastian Geller

Macro Definition Documentation

◆ SSTR

Definition at line 45 of file StringUtil.h.

Function Documentation

◆ contains()

bool StringUtil::contains ( const std::string &  source,
const char find 
)
static

Definition at line 63 of file StringUtil.cpp.

◆ endsWith()

bool StringUtil::endsWith ( const std::string &  input,
const std::string &  end 
)
static

Definition at line 194 of file StringUtil.cpp.

◆ findAndReplace()

std::string StringUtil::findAndReplace ( const std::string &  source,
const std::string &  find,
const std::string &  replace 
)
static

Definition at line 40 of file StringUtil.cpp.

◆ makeLower()

std::string StringUtil::makeLower ( const std::string &  instring)
static

Definition at line 56 of file StringUtil.cpp.

◆ makeUpper()

std::string StringUtil::makeUpper ( const std::string &  instring)
static

Definition at line 49 of file StringUtil.cpp.

◆ pad()

std::string StringUtil::pad ( const std::string &  input,
char  pad,
int  length 
)
static

Definition at line 65 of file StringUtil.cpp.

◆ split() [1/2]

std::vector< std::string > StringUtil::split ( const std::string &  input,
const std::string &  delim = " " 
)
static

Definition at line 120 of file StringUtil.cpp.

◆ split() [2/2]

std::vector< std::string > split ( const std::string str,
char  delim = ' ' 
)

Definition at line 109 of file StringUtil.cpp.

◆ toBool()

bool StringUtil::toBool ( const std::string &  input)
static

Definition at line 94 of file StringUtil.cpp.

◆ toBoolVector()

std::vector< bool > StringUtil::toBoolVector ( const std::string &  s)
static

Definition at line 157 of file StringUtil.cpp.

◆ toDouble()

double StringUtil::toDouble ( const std::string &  input)
static

Definition at line 92 of file StringUtil.cpp.

◆ toDoubleVector()

std::vector< double > StringUtil::toDoubleVector ( const std::string &  s)
static

Definition at line 173 of file StringUtil.cpp.

◆ toFloat()

float StringUtil::toFloat ( const std::string &  input)
static

Definition at line 90 of file StringUtil.cpp.

◆ toInt()

int StringUtil::toInt ( const std::string &  input)
static

Definition at line 88 of file StringUtil.cpp.

◆ toIntVector()

std::vector< int > StringUtil::toIntVector ( const std::string &  s)
static

Definition at line 135 of file StringUtil.cpp.

◆ toString()

template<typename T >
template std::string StringUtil::toString< int > ( const T t)
static

Definition at line 185 of file StringUtil.cpp.

◆ toStringVector()

std::vector< std::string > StringUtil::toStringVector ( const std::string &  s)
static

Definition at line 171 of file StringUtil.cpp.

◆ toUintVector()

std::vector< unsigned int > StringUtil::toUintVector ( const std::string &  s)
static

Definition at line 146 of file StringUtil.cpp.

◆ trim()

std::string StringUtil::trim ( const std::string &  input,
const std::string &  trim = std::string(" \t\n") 
)
static

Definition at line 73 of file StringUtil.cpp.