This commit is contained in:
niczkx
2012-07-16 05:41:38 +03:00
parent c131d29b5f
commit 12d30f7355
8 changed files with 221 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
#include <sstream>
#include <iomanip>
#include <vector>
#include <cctype>
#include <boost/algorithm/string.hpp>
#include "types.h"
@@ -213,6 +214,18 @@ inline std::string utf8StringToLatin1(uchar *utf8) {
return out;
}
// Convert string to lower case
inline std::string toLowerCaseString(std::string& str) {
std::transform(str.begin(), str.end(), str.begin(), tolower);
return str;
}
// Convert string to upper case
inline std::string toUpperCaseString(std::string& str) {
std::transform(str.begin(), str.end(), str.begin(), toupper);
return str;
}
// utility for printing messages into stdout
template<class... T>
void print(const T&... args) {