Useful methods when working with strings.
| std::string StringTool::combine |
( |
std::vector< std::string > |
strings, |
|
|
char |
delim = ';' |
|
) |
| |
- Parameters
-
| strings | vector of string to combine |
| delim | delimiter |
- Returns
- Combined string
Definition at line 61 of file StringTool.cpp.
| void StringTool::explode |
( |
std::string |
str, |
|
|
char |
delimiter, |
|
|
std::vector< std::string > & |
result |
|
) |
| |
- Parameters
-
| str | source string |
| delimiter | delimiting character |
| result | list containing the found substrings |
Definition at line 46 of file StringTool.cpp.
| std::string StringTool::toLowerCase |
( |
std::string |
s | ) |
|
- Parameters
-
- Returns
- lowercase output string
Definition at line 55 of file StringTool.cpp.
| std::string StringTool::trim |
( |
const std::string & |
s, |
|
|
const std::string & |
t = " \t\r\n" |
|
) |
| |
| std::string StringTool::trimLeft |
( |
const std::string & |
s, |
|
|
const std::string & |
t = " \t\r\n" |
|
) |
| |
- Parameters
-
| s | source string |
| t | characters to remove |
- Returns
- modified string (copy)
Definition at line 36 of file StringTool.cpp.
| std::string StringTool::trimRight |
( |
const std::string & |
s, |
|
|
const std::string & |
t = " \t\r\n" |
|
) |
| |
- Parameters
-
| s | source string |
| t | characters to remove |
- Returns
- modified string (copy)
Definition at line 27 of file StringTool.cpp.