40 std::stringstream ss(s);
48 inline static std::string
ToString(T
const& value)
56 static std::string
ToUpper(std::string
const& source)
58 auto upper = [](
int c) ->
int {
return std::toupper(c); };
60 std::transform(source.begin(), source.end(), std::back_inserter(copy), upper);
65 static std::string
TrimRight(std::string
const& source, std::string
const& t =
" ")
67 std::string str = source;
68 return str.erase(str.find_last_not_of(t) + 1);
72 static std::string
TrimLeft(std::string
const& source, std::string
const& t =
" ")
74 std::string str = source;
75 return str.erase(0, source.find_first_not_of(t));
79 static std::string
Trim(std::string
const& source, std::string
const& t =
" ")
81 std::string str = source;
static std::string TrimRight(std::string const &source, std::string const &t=" ")
Trim characters at right end of string.
static std::string Trim(std::string const &source, std::string const &t=" ")
Trim characters at both ends of string.
static std::string ToUpper(std::string const &source)
Builds a string with upper case characters only.
static std::string TrimLeft(std::string const &source, std::string const &t=" ")
Trim characters at left end of string.
static std::string ToString(T const &value)
Builds a string representation of a value of type T.
static T FromString(std::string const &s)
Builds a value of type T representation from a string.