diff options
| author | Stefan Uhrig <[email protected]> | 2005-03-28 17:15:54 +0000 |
|---|---|---|
| committer | Stefan Uhrig <[email protected]> | 2005-03-28 17:15:54 +0000 |
| commit | eb8e3842fc77b2ae3f7491bef864f7c5de353869 (patch) | |
| tree | 7e8af123e02739c9e5c846fff9e78d8e852ee831 /src/utility/stringUtils.cpp | |
| parent | Oops... Fixed missing 'x' when testing target OS. (diff) | |
| download | vmime-eb8e3842fc77b2ae3f7491bef864f7c5de353869.tar.gz vmime-eb8e3842fc77b2ae3f7491bef864f7c5de353869.zip | |
Added toUpper() function
Diffstat (limited to 'src/utility/stringUtils.cpp')
| -rw-r--r-- | src/utility/stringUtils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utility/stringUtils.cpp b/src/utility/stringUtils.cpp index 70d8aa8e..fd81297b 100644 --- a/src/utility/stringUtils.cpp +++ b/src/utility/stringUtils.cpp @@ -87,6 +87,18 @@ const string stringUtils::toLower(const string& str) } +const string stringUtils::toUpper(const string& str) +{ + string out(str); + const string::iterator end = out.end(); + + for (string::iterator i = out.begin() ; i != end ; ++i) + *i = std::toupper(*i, std::locale()); + + return (out); +} + + const string stringUtils::trim(const string& str) { string::const_iterator b = str.begin(); |
