Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 String = std::string>
String str_snprintf (size_t max_size, const char *fmt,...) TLX_ATTRIBUTE_FORMAT_PRINTF(2
 Helper for using sprintf to format into std::string and also to_string converters. More...
 
template<typename String >
String String str_snprintf (size_t max_size, const char *fmt,...)
 
template<typename String = std::string>
String str_sprintf (const char *fmt,...) TLX_ATTRIBUTE_FORMAT_PRINTF(1
 Helper for using sprintf to format into std::string and also to_string converters. More...
 
template<typename String >
String String str_sprintf (const char *fmt,...)
 
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

#define THRILL_COMMON_STRING_HEADER

Definition at line 15 of file string.hpp.