24.02
|
Functions | |
std::vector< std::string > | StringTokenizer (const std::string &str, const char *delimiters, bool tokenCompression=true) |
Function to take a string and a list of delimiters and split the string into tokens based on those delimiters This assumes that tokens are also to be split by newlines Enabling tokenCompression merges adjacent delimiters together, preventing empty tokens. More... | |
std::string & | StringStartTrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trim from the start of a string. More... | |
std::string & | StringEndTrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trim for the end of a string. More... | |
std::string & | StringTrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trim from both the start and the end of a string. More... | |
std::string | StringTrimCopy (const std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trim from both the start and the end of a string, returns a trimmed copy of the string. More... | |
std::string | StringConcat (const std::vector< std::string > &strings, std::string seperator="") |
Takes a vector of strings and concatenates them together into one long std::string with an optional seperator between each. More... | |
void | StringReplaceAll (std::string &str, const std::string &oldStr, const std::string &newStr) |
Iterates over a given str and replaces all instance of substring oldStr with newStr. More... | |
bool | StringToBool (const std::string &s, bool throw_on_error=true) |
Converts a string to bool. More... | |
|
inline |
Takes a vector of strings and concatenates them together into one long std::string with an optional seperator between each.
Definition at line 96 of file StringUtils.hpp.
|
inline |
Trim for the end of a string.
Definition at line 71 of file StringUtils.hpp.
Referenced by StringTrim(), and StringTrimCopy().
|
inline |
Iterates over a given str and replaces all instance of substring oldStr with newStr.
Definition at line 109 of file StringUtils.hpp.
|
inline |
Trim from the start of a string.
Definition at line 62 of file StringUtils.hpp.
Referenced by StringTrim(), and StringTrimCopy().
|
inline |
Converts a string to bool.
Accepts "true", "false" (case-insensitive) and numbers, 1 (true) or 0 (false).
s | String to convert to bool |
throw_on_error | Bool variable to suppress error if conversion failed (Will return false in that case) |
Definition at line 129 of file StringUtils.hpp.
|
inline |
Function to take a string and a list of delimiters and split the string into tokens based on those delimiters This assumes that tokens are also to be split by newlines Enabling tokenCompression merges adjacent delimiters together, preventing empty tokens.
Definition at line 23 of file StringUtils.hpp.
Referenced by DynamicBackendUtils::GetBackendPathsImpl().
|
inline |
Trim from both the start and the end of a string.
Definition at line 80 of file StringUtils.hpp.
References StringEndTrim(), and StringStartTrim().
|
inline |
Trim from both the start and the end of a string, returns a trimmed copy of the string.
Definition at line 88 of file StringUtils.hpp.
References StringEndTrim(), and StringStartTrim().