Utility class that holds string methods.
More...
#include <>>
Static Public Member Functions |
static std::string | to_upper (std::string str) |
| Convert string to all-uppercase string.
|
static std::string | to_lower (std::string str) |
| Convert string to all-lowercase string.
|
static std::string | to_string (unsigned int i) |
| Convert unsigned int value to a string.
|
static std::string | to_string (int i) |
| Convert int value to a string.
|
static std::string | to_string (long int i) |
| Convert long int value to a string.
|
static std::string | to_string (float f) |
| Convert float value to a string.
|
static std::string | to_string (double d) |
| Convert double value to a string.
|
static std::string | to_string (bool b) |
| Convert bool value to a string.
|
static unsigned int | to_uint (std::string s) |
| Convert string to an unsigned int value.
|
static int | to_int (std::string s) |
| Convert string to an int value.
|
static float | to_float (std::string s) |
| Convert string to a float value.
|
static double | to_double (std::string s) |
| Convert string to a double value.
|
static bool | to_bool (std::string s) |
| Convert string to a bool value.
|
static void | trim_inplace (std::string &s) |
| Trim string.
|
static std::string | trim (std::string &s) |
| Trim spring.
|
Detailed Description
Utility class that holds string methods.
- Author
- Tim Niemueller
Definition at line 32 of file string_conversions.h.
Member Function Documentation
bool fawkes::StringConversions::to_bool |
( |
std::string |
s | ) |
|
|
static |
Convert string to a bool value.
- Parameters
-
- Returns
- value as represented by string
Definition at line 224 of file string_conversions.cpp.
double fawkes::StringConversions::to_double |
( |
std::string |
s | ) |
|
|
static |
Convert string to a double value.
- Parameters
-
- Returns
- value as represented by string
Definition at line 213 of file string_conversions.cpp.
float fawkes::StringConversions::to_float |
( |
std::string |
s | ) |
|
|
static |
Convert string to a float value.
- Parameters
-
- Returns
- value as represented by string
Definition at line 202 of file string_conversions.cpp.
int fawkes::StringConversions::to_int |
( |
std::string |
s | ) |
|
|
static |
std::string fawkes::StringConversions::to_lower |
( |
std::string |
str | ) |
|
|
static |
Convert string to all-lowercase string.
- Parameters
-
- Returns
- converted string
Definition at line 60 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_string |
( |
unsigned int |
i | ) |
|
|
static |
std::string fawkes::StringConversions::to_string |
( |
int |
i | ) |
|
|
static |
Convert int value to a string.
- Parameters
-
- Returns
- string representation of value.
Definition at line 92 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_string |
( |
long int |
i | ) |
|
|
static |
Convert long int value to a string.
- Parameters
-
- Returns
- string representation of value.
Definition at line 110 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_string |
( |
float |
f | ) |
|
|
static |
Convert float value to a string.
- Parameters
-
- Returns
- string representation of value.
Definition at line 128 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_string |
( |
double |
d | ) |
|
|
static |
Convert double value to a string.
- Parameters
-
- Returns
- string representation of value.
Definition at line 146 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_string |
( |
bool |
b | ) |
|
|
static |
Convert bool value to a string.
- Parameters
-
- Returns
- string representation of value.
Definition at line 164 of file string_conversions.cpp.
unsigned int fawkes::StringConversions::to_uint |
( |
std::string |
s | ) |
|
|
static |
Convert string to an unsigned int value.
- Parameters
-
- Returns
- value as represented by string
Definition at line 179 of file string_conversions.cpp.
std::string fawkes::StringConversions::to_upper |
( |
std::string |
str | ) |
|
|
static |
std::string fawkes::StringConversions::trim |
( |
std::string & |
s | ) |
|
|
static |
Trim spring.
Removes spaces at beginning and end of string.
- Parameters
-
- Returns
- trimmed string
Definition at line 255 of file string_conversions.cpp.
void fawkes::StringConversions::trim_inplace |
( |
std::string & |
s | ) |
|
|
static |
Trim string.
Removes spaces at beginning and end of string.
- Parameters
-
s | string to trim, upon return contains trimmed string |
Definition at line 240 of file string_conversions.cpp.
The documentation for this class was generated from the following files: