|
template<typename T , typename U > |
T | Rivet::lexical_cast (const U &in) |
| Convert between any types via stringstream.
|
|
template<typename T > |
string | Rivet::to_str (const T &x) |
| Convert any object to a string.
|
|
template<typename T > |
string | Rivet::toString (const T &x) |
| Convert any object to a string.
|
|
string & | Rivet::replace_first (string &str, const string &patt, const string &repl) |
| Replace the first instance of patt with repl.
|
|
string & | Rivet::replace_all (string &str, const string &patt, const string &repl) |
| Replace all instances of patt with repl.
|
|
int | Rivet::nocase_cmp (const string &s1, const string &s2) |
| Case-insensitive string comparison function.
|
|
bool | Rivet::nocase_equals (const string &s1, const string &s2) |
| Case-insensitive string equality function.
|
|
string | Rivet::toLower (const string &s) |
| Convert a string to lower-case.
|
|
string | Rivet::toUpper (const string &s) |
| Convert a string to upper-case.
|
|
bool | Rivet::startsWith (const string &s, const string &start) |
| Check whether a string start is found at the start of s.
|
|
bool | Rivet::endsWith (const string &s, const string &end) |
| Check whether a string end is found at the end of s.
|
|
string | Rivet::strcat () |
|
template<typename T , typename... Ts> |
string | Rivet::strcat (T value, Ts... fargs) |
| Make a string containing the concatenated string representations of each item in the variadic list.
|
|
template<typename T > |
string | Rivet::join (const vector< T > &v, const string &sep=" ") |
| Make a string containing the string representations of each item in v, separated by sep.
|
|
template<> |
string | Rivet::join (const vector< string > &v, const string &sep) |
| Make a string containing the string representations of each item in v, separated by sep.
|
|
template<typename T > |
string | Rivet::join (const set< T > &s, const string &sep=" ") |
| Make a string containing the string representations of each item in s, separated by sep.
|
|
template<> |
string | Rivet::join (const set< string > &s, const string &sep) |
| Make a string containing the string representations of each item in s, separated by sep.
|
|
vector< string > | Rivet::split (const string &s, const string &sep) |
| Split a string on a specified separator string.
|
|
string | Rivet::lpad (const string &s, size_t width, const string &padchar=" ") |
| Left-pad the given string s to width width.
|
|
string | Rivet::rpad (const string &s, size_t width, const string &padchar=" ") |
| Right-pad the given string s to width width.
|
|