From 186eb8dcc63052a167c61f29828a54902916c74d Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Thu, 13 Jan 2011 15:02:23 +0100 Subject: Moved the normalize() function in strungUtils where it belongs. (Preparation for bringing a smaller item loading refactoring patch.) Trivial. --- src/utils/stringutils.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/utils/stringutils.h') diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index 4532a5b00..15d41380f 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -110,8 +110,6 @@ std::string &removeBadChars(std::string &str); */ std::string removeColors(std::string msg); -bool isWordSeparator(char chr); - const std::string findSameSubstring(const std::string &str1, const std::string &str2); @@ -125,6 +123,11 @@ const std::string findSameSubstring(const std::string &str1, */ int compareStrI(const std::string &a, const std::string &b); +/** + * Tells wether the character is a word separator. + */ +bool isWordSeparator(char chr); + unsigned long findI(std::string str, std::string subStr); unsigned long findI(std::string str, std::list &list); @@ -156,4 +159,9 @@ bool getBoolFromString(const std::string &text); void replaceSpecialChars(std::string &text); +/** + * Normalize a string, which means lowercase and trim it. + */ +std::string normalize(const std::string &name); + #endif // UTILS_STRINGUTILS_H -- cgit v1.2.3-70-g09d2