Strings and text
Convert values and types to strings (str, type_str), change the case, pad with zeros.
Compute 2
contains
2 overloadstemplate <typename T1, typename T2>
bool contains(std::map<T1,T2> const& m, T1 const& key)sourceChecks whether a key exists in the map.
template <typename T>
bool contains(std::map<std::string,T> const& m, char const* key)sourceChecks whether a C-string key exists in a map with string keys.
Convert 39
str
15 overloadsstd::string str(float a)sourceText representation of a float value (std::to_string).
std::string str(double a)sourceText representation of a double value (std::to_string).
std::string str(char a)sourceOne-character string made of the given char.
std::string str(short a)sourceText representation of a short value (std::to_string).
std::string str(int a)sourceText representation of a int value (std::to_string).
std::string str(long a)sourceText representation of a long value (std::to_string).
std::string str(long long a)sourceText representation of a long long value (std::to_string).
std::string str(unsigned char a)sourceDecimal representation of the unsigned char value (a number, not a character).
std::string str(unsigned short a)sourceText representation of a unsigned short value (std::to_string).
std::string str(unsigned int a)sourceText representation of a unsigned int value (std::to_string).
std::string str(unsigned long a)sourceText representation of a unsigned long value (std::to_string).
std::string str(unsigned long long a)sourceText representation of a unsigned long long value (std::to_string).
template <typename T1, typename T2>
std::string str(std::map<T1,T2> const& m)sourceText representation of a map as "{key:value key:value }".
std::string const& str(std::string const& s)sourceReturns the string itself (identity overload so that str() works on any type).
std::string str(char const* s)sourceConverts a C-string to std::string.
std::string str_lower(std::string const& s)Copy of the string converted to lowercase.
std::string str_upper(std::string const& s)Copy of the string converted to uppercase.
std::string str_zero_fill(std::string const& input, size_t number_of_zero)Left-pads the string with zeros up to the given total length (unchanged if already longer).
type_str
21 overloadsstd::string type_str(float)sourceType name as a string: "float".
std::string type_str(double)sourceType name as a string: "double".
std::string type_str(char)sourceType name as a string: "char".
std::string type_str(short)sourceType name as a string: "short".
std::string type_str(int)sourceType name as a string: "int".
std::string type_str(long)sourceType name as a string: "long".
std::string type_str(long long)sourceType name as a string: "long long".
std::string type_str(unsigned char)sourceType name as a string: "unsigned char".
std::string type_str(unsigned short)sourceType name as a string: "unsigned short".
std::string type_str(unsigned int)sourceType name as a string: "unsigned int".
std::string type_str(unsigned long)sourceType name as a string: "unsigned long".
std::string type_str(unsigned long long)sourceType name as a string: "unsigned long long".
template <typename T>
std::string type_str(std::set<T> const&)sourceType name as a string, e.g. "std::set<int>".
std::string type_str(std::string const& s)sourceType name as a string: "string".
template <typename T>
std::string type_str(T const&)sourceFallback for types without a dedicated type_str overload; returns a placeholder message.
std::string type_str(int2 const&)sourceType name as a string: "int2".
std::string type_str(int3 const&)sourceType name as a string: "int3".
std::string type_str(int4 const&)sourceType name as a string: "int4".
std::string type_str(uint2 const&)sourceType name as a string: "uint2".
std::string type_str(uint3 const&)sourceType name as a string: "uint3".
std::string type_str(uint4 const&)sourceType name as a string: "uint4".