diff options
Diffstat (limited to 'src/Common/Util.h')
-rw-r--r-- | src/Common/Util.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/Common/Util.h b/src/Common/Util.h index 19f87b9..8df5cac 100644 --- a/src/Common/Util.h +++ b/src/Common/Util.h @@ -21,8 +21,6 @@ #define MAD_COMMON_UTIL_H_ #include <string> -#include <locale> -#include <vector> namespace Mad { namespace Common { @@ -32,29 +30,8 @@ class Util { Util(); public: - static std::string tolower(const std::string &str) { - std::string ret; - - for(std::string::const_iterator c = str.begin(); c != str.end(); ++c) - ret += std::tolower(*c); - - return ret; - } - - static std::string trim(const std::string &str) { - size_t beg, end; - - beg = str.find_first_not_of(" \t"); - end = str.find_last_not_of(" \t"); - - if(beg == std::string::npos) - beg = 0; - - if(end != std::string::npos) - end = end-beg+1; - - return str.substr(beg, end); - } + static std::string tolower(const std::string &str); + static std::string trim(const std::string &str); }; } |