OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
string_util.h File Reference
#include <string>
#include <sstream>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/uuid/nil_generator.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
Include dependency graph for string_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename NumberType >
static const std::string integerToString (const NumberType &num)
 
template<>
const std::string integerToString (const int8_t &num)
 
template<>
const std::string integerToString (const uint8_t &num)
 
template<typename NumberType >
static const std::string integerToHexString (const NumberType &num)
 
template<>
const std::string integerToHexString (const int8_t &num)
 
template<>
const std::string integerToHexString (const uint8_t &num)
 
template<typename NumberType >
bool stringToInteger (const std::string &str, NumberType &num)
 
template<typename NumberType >
bool stringToLongLong (const std::string &str, NumberType &num)
 
template<>
bool stringToInteger (const std::string &str, int64_t &num)
 
template<>
bool stringToInteger (const std::string &str, uint64_t &num)
 
template<>
bool stringToInteger (const std::string &str, double &num)
 
template<typename NumberType >
static bool stringToIntegerList (std::string input, std::string seperator, std::vector< NumberType > &entries)
 
static std::string UuidToString (const boost::uuids::uuid &id)
 
static boost::uuids::uuid StringToUuid (const std::string &str)
 
static std::string BoolToString (const bool &val)
 
static bool StringToBool (const std::string &in_string)
 

Function Documentation

static std::string BoolToString ( const bool &  val)
inlinestatic

Definition at line 153 of file string_util.h.

template<typename NumberType >
static const std::string integerToHexString ( const NumberType &  num)
inlinestatic

Definition at line 45 of file string_util.h.

template<>
const std::string integerToHexString ( const int8_t &  num)
inline

Definition at line 54 of file string_util.h.

template<>
const std::string integerToHexString ( const uint8_t &  num)
inline

Definition at line 63 of file string_util.h.

template<typename NumberType >
static const std::string integerToString ( const NumberType &  num)
inlinestatic

Definition at line 19 of file string_util.h.

template<>
const std::string integerToString ( const int8_t &  num)
inline

Definition at line 28 of file string_util.h.

template<>
const std::string integerToString ( const uint8_t &  num)
inline

Definition at line 37 of file string_util.h.

static bool StringToBool ( const std::string &  in_string)
inlinestatic

Definition at line 161 of file string_util.h.

template<typename NumberType >
bool stringToInteger ( const std::string &  str,
NumberType &  num 
)
inline

Definition at line 71 of file string_util.h.

template<>
bool stringToInteger ( const std::string &  str,
int64_t &  num 
)
inline

Definition at line 85 of file string_util.h.

Here is the call graph for this function:

template<>
bool stringToInteger ( const std::string &  str,
uint64_t &  num 
)
inline

Definition at line 90 of file string_util.h.

Here is the call graph for this function:

template<>
bool stringToInteger ( const std::string &  str,
double &  num 
)
inline

Definition at line 95 of file string_util.h.

template<typename NumberType >
static bool stringToIntegerList ( std::string  input,
std::string  seperator,
std::vector< NumberType > &  entries 
)
inlinestatic

Definition at line 107 of file string_util.h.

template<typename NumberType >
bool stringToLongLong ( const std::string &  str,
NumberType &  num 
)
inline

Definition at line 78 of file string_util.h.

static boost::uuids::uuid StringToUuid ( const std::string &  str)
inlinestatic

Definition at line 145 of file string_util.h.

static std::string UuidToString ( const boost::uuids::uuid id)
inlinestatic

Definition at line 138 of file string_util.h.