util/utils.h File Reference
Go to the source code of this file.
|
Functions |
template<typename A , typename B > |
B | convertTo (A a) |
void | chomp (std::string &str) |
Function Documentation
void chomp |
( |
std::string & |
str |
) |
|
Remove whitespaces at the end and the beginning of str.
Example:
std::string foo(" bar ");
chomp(foo);
The result is: foo = "bar" (whitespaces removed)
- Parameters:
-
| str | in/out: Reference to a string to be modified. |
Definition at line 3 of file utils.cpp.