diff options
Diffstat (limited to 'src/lib/util/corestr.cpp')
-rw-r--r-- | src/lib/util/corestr.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp index c8775f1cec0..b9e56c5cdc5 100644 --- a/src/lib/util/corestr.cpp +++ b/src/lib/util/corestr.cpp @@ -171,7 +171,7 @@ void strreplacechr(std::string& str, char ch, char newch) } } -static std::string internal_strtrimspace(std::string& str, bool right_only) +static std::string &internal_strtrimspace(std::string& str, bool right_only) { // identify the start std::string::iterator start = str.begin(); @@ -196,33 +196,33 @@ static std::string internal_strtrimspace(std::string& str, bool right_only) return str; } -std::string strtrimspace(std::string& str) +std::string &strtrimspace(std::string& str) { return internal_strtrimspace(str, false); } -std::string strtrimrightspace(std::string& str) +std::string &strtrimrightspace(std::string& str) { return internal_strtrimspace(str, true); } -std::string strmakeupper(std::string& str) +std::string &strmakeupper(std::string& str) { std::transform(str.begin(), str.end(), str.begin(), ::toupper); return str; } /** - * @fn std::string strmakelower(std::string& str) + * @fn std::string &strmakelower(std::string& str) * - * @brief Strmakelowers the given string. + * @brief Changes the given string to lower case. * - * @param [in,out] str The string. + * @param [in,out] str The string to make lower case * - * @return A std::string. + * @return A reference to the original std::string having been changed to lower case */ -std::string strmakelower(std::string& str) +std::string &strmakelower(std::string& str) { std::transform(str.begin(), str.end(), str.begin(), ::tolower); return str; |