30 using strvec = std::vector<std::string>;
53 std::string
lstrip(
const std::string &str);
60 std::string
rstrip(
const std::string &str);
67 std::string
strip(
const std::string &str);
77 bool starts_with(
const std::string &str,
const std::string &start,
bool ignoreCase =
false);
86 bool ends_with(
const std::string &str,
const std::string &end,
bool ignoreCase =
false);
95 strvec split(
const std::string &str,
const std::string &separator);
103 std::string
join(
const strvec &strlist,
const std::string &separator =
"");
std::vector< std::string > strvec
The type of vector strings used in this library.
Definition strutil.h:30
std::string rstrip(const std::string &str)
Remove trailing whitespaces from a string.
bool ends_with(const std::string &str, const std::string &end, bool ignoreCase=false)
Check if a string ends with a given substring.
std::string to_lower(const std::string &str)
Convert a string to lower case.
strvec split(const std::string &str, const std::string &separator)
Split a string into a vector of substrings using a given separator.
std::string to_upper(const std::string &str)
Convert a string to upper case.
std::string join(const strvec &strlist, const std::string &separator="")
Join a vector of strings into a single string using a given separator.
bool starts_with(const std::string &str, const std::string &start, bool ignoreCase=false)
Check if a string starts with a given substring.
std::string lstrip(const std::string &str)
Remove leading whitespaces from a string.
std::string strip(const std::string &str)
Remove leading and trailing whitespaces from a string.
std::string desensitizing(const std::string &str)
Desensitizing a string by replacing some characters with '*'.