#include <string>
#include <sstream>
Go to the source code of this file.
Functions | |
std::string & | trim (std::string &str) |
Trims spaces off the end and the beginning of the given string. | |
std::string & | toLower (std::string &str) |
Converts the given string to lower case. | |
template<typename T> | |
std::string | toString (const T &arg) |
Converts the given value to a string using std::stringstream. | |
const char * | ipToString (int address) |
Converts the given IP address to a string. | |
std::string & | removeBadChars (std::string &str) |
Removes bad characters from a string. |
const char* ipToString | ( | int | address | ) |
Converts the given IP address to a string.
The returned string is statically allocated, and shouldn't be freed. It is changed upon the next use of this method.
address | the address to convert to a string |
Definition at line 52 of file stringutils.cpp.
std::string& removeBadChars | ( | std::string & | str | ) |
Removes bad characters from a string.
str | the string to remove the bad chars from |
Definition at line 65 of file stringutils.cpp.
std::string& toLower | ( | std::string & | str | ) |
Converts the given string to lower case.
str | the string to convert to lower case |
Definition at line 46 of file stringutils.cpp.
std::string toString | ( | const T & | arg | ) | [inline] |
Converts the given value to a string using std::stringstream.
arg | the value to convert to a string |
Definition at line 50 of file stringutils.h.
std::string& trim | ( | std::string & | str | ) |
Trims spaces off the end and the beginning of the given string.
str | the string to trim spaces off |
Definition at line 26 of file stringutils.cpp.