Thrill  0.1
string.hpp File Reference
#include <tlx/define.hpp>
#include <tlx/unused.hpp>
#include <array>
#include <cstdarg>
#include <cstdlib>
#include <limits>
#include <random>
#include <sstream>
#include <string>
#include <vector>
+ Include dependency graph for string.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 thrill
 
 thrill::common
 Contains many common tools and helpers shared by higher layers. See common.
 

Macros

#define THRILL_COMMON_STRING_HEADER
 

Functions

template<typename T >
T from_cstr (const char *nptr, char **endptr=nullptr, int base=10)
 Number parsing helpers, wraps strto{f,d,ld,l,ul,ll,ull}() via type switch. More...
 
template<>
double from_cstr< double > (const char *nptr, char **endptr, int)
 
template<>
float from_cstr< float > (const char *nptr, char **endptr, int)
 
template<>
long from_cstr< long > (const char *nptr, char **endptr, int base)
 
template<>
long double from_cstr< long double > (const char *nptr, char **endptr, int)
 
template<>
long long from_cstr< long long > (const char *nptr, char **endptr, int base)
 
template<>
unsigned long from_cstr< unsigned long > (const char *nptr, char **endptr, int base)
 
template<>
unsigned long long from_cstr< unsigned long long > (const char *nptr, char **endptr, int base)
 
template<typename Type >
static bool from_str (const std::string &str, Type &outval)
 Template transformation function which uses std::istringstream to parse any istreamable type from a std::string. More...
 
template<typename RandomEngine = std::default_random_engine>
static std::string RandomString (std::string::size_type size, RandomEngine rng, const std::string &letters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")
 Generate a random string of given length. More...
 
template<typename Type >
static std::string to_str (const Type &t)
 
template<typename T , size_t N>
static std::string VecToStr (const std::array< T, N > &data)
 Logging helper to print arrays as [a1,a2,a3,...]. More...
 
template<typename T >
static std::string VecToStr (const std::vector< T > &data)
 Logging helper to print vectors as [a1,a2,a3,...]. More...
 

Macro Definition Documentation

◆ THRILL_COMMON_STRING_HEADER

#define THRILL_COMMON_STRING_HEADER

Definition at line 15 of file string.hpp.