#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/tokenizer.hpp>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <type_traits>
Go to the source code of this file.
|
template<typename T , typename U > |
T | utl::As (const U &x) |
| useful shorthand for boost::lexical_cast More...
|
|
template<typename T > |
std::string | utl::String::AsBinary (const T &number, const int maxBits=8 *sizeof(T), const char separator= ' ', const int stride=4) |
| converts integer-type numbers into a string of binary representation More...
|
|
template<typename T > |
std::pair< double, char > | utl::String::AsHumanReadable (const T &x, const int thousand=1000) |
|
template<class T > |
std::vector< T > | utl::String::AsVectorOf (const std::string &str) |
|
oss<< "0b";oss<< ((x >> i)&1);return oss.str();}template< class S, class V > std::string | utl::Join (const S &sep, const V &v) |
|
template<typename Geo , typename CS > |
std::string | utl::String::Make (const Geo &g, const CS &cs, const double unit=1, const std::string &sep=" ") |
|
template<typename Map > |
std::string | utl::String::OfMapKeys (const Map &m, const std::string "e="'", const std::string &separator=", ") |
|
std::string | utl::String::OfSortedIds (std::vector< int > ids) |
|
std::string | utl::String::OfSortedIds (const std::set< int > &ids) |
|
template<typename T , typename = typename std::enable_if<std::is_integral<T>::value, T>::type> |
const char * | utl::String::Plural (const T n) |
|
template<class Container , typename T = typename Container::value_type> |
const char * | utl::String::Plural (const Container &c) |
|
std::vector< std::string > | utl::String::Split (const std::string &str, const char *const separators=" ") |
|
std::string | utl::String::Strip (std::string str) |
|