C++ Utilities  4.17.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Namespaces | Functions
stringbuilder.h File Reference
#include "../misc/traits.h"
#include "./stringconversion.h"
#include <string>
#include <tuple>
Include dependency graph for stringbuilder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ConversionUtilities
 Contains several functions providing conversions between different data types.
 

Functions

template<class StringType = std::string, class... Args>
StringType ConversionUtilities::tupleToString (const std::tuple< Args... > &tuple)
 Concatenates all strings hold by the specified tuple. More...
 
template<class StringType = std::string, class... Args>
constexpr StringType ConversionUtilities::argsToString (Args &&... args)
 
template<class Tuple >
constexpr auto ConversionUtilities::operator% (const Tuple &lhs, const std::string &rhs) -> decltype(std::tuple_cat(lhs, std::make_tuple(&rhs)))
 Allows construction of string-tuples via %-operator, eg. More...
 
template<class Tuple >
constexpr auto ConversionUtilities::operator% (const Tuple &lhs, const char *rhs) -> decltype(std::tuple_cat(lhs, std::make_tuple(rhs)))
 Allows construction of string-tuples via %-operator, eg. More...
 
template<class Tuple , typename IntegralType , Traits::EnableIf< std::is_integral< IntegralType >> * = nullptr>
constexpr auto ConversionUtilities::operator% (const Tuple &lhs, IntegralType rhs) -> decltype(std::tuple_cat(lhs, std::make_tuple(rhs)))
 Allows construction of string-tuples via %-operator, eg. More...
 
constexpr auto ConversionUtilities::operator% (const std::string &lhs, const std::string &rhs) -> decltype(std::make_tuple(&lhs, &rhs))
 Allows construction of string-tuples via %-operator, eg. More...
 
constexpr auto ConversionUtilities::operator% (const char *lhs, const std::string &rhs) -> decltype(std::make_tuple(lhs, &rhs))
 Allows construction of string-tuples via %-operator, eg. More...
 
constexpr auto ConversionUtilities::operator% (const std::string &lhs, const char *rhs) -> decltype(std::make_tuple(&lhs, rhs))
 Allows construction of string-tuples via %-operator, eg. More...
 
constexpr auto ConversionUtilities::operator% (const std::string &lhs, char rhs) -> decltype(std::make_tuple(&lhs, rhs))
 Allows construction of string-tuples via %-operator, eg. More...
 
constexpr auto ConversionUtilities::operator% (char lhs, const std::string &rhs) -> decltype(std::make_tuple(lhs, &rhs))
 Allows construction of string-tuples via %-operator, eg. More...
 
template<class Tuple , Traits::EnableIf< Traits::IsSpecializationOf< Tuple, std::tuple >> * = nullptr>
std::string ConversionUtilities::operator+ (const Tuple &lhs, const std::string &rhs)
 Allows construction of final string from previously constructed string-tuple and trailing string via +-operator. More...
 
template<class Tuple , Traits::EnableIf< Traits::IsSpecializationOf< Tuple, std::tuple >> * = nullptr>
std::string ConversionUtilities::operator+ (const Tuple &lhs, const char *rhs)
 Allows construction of final string from previously constructed string-tuple and trailing string via +-operator. More...
 
template<class Tuple , typename IntegralType , Traits::EnableIf< Traits::IsSpecializationOf< Tuple, std::tuple >, std::is_integral< IntegralType >> * = nullptr>
std::string ConversionUtilities::operator+ (const Tuple &lhs, IntegralType rhs)
 Allows construction of final string from previously constructed string-tuple and trailing char via +-operator. More...