This commit is contained in:
niczkx
2012-07-18 00:03:46 +02:00
parent 02f89dd8be
commit 28825a3298
9 changed files with 62 additions and 68 deletions

View File

@@ -120,7 +120,6 @@ R unsafe_cast(const T& t, R def) {
return def;
}
}
}
#endif

View File

@@ -214,10 +214,20 @@ inline std::string utf8StringToLatin1(uchar *utf8) {
}
// Convert string to lower case
inline std::string tolower(std::string& str) { return boost::algorithm::to_lower_copy(str); }
inline std::string tolower(const std::string& str)
{
std::string _str = str;
boost::algorithm::to_lower(_str);
return _str;
}
// Convert string to upper case
inline std::string toupper(std::string& str) { return boost::algorithm::to_upper_copy(str); }
inline std::string toupper(const std::string& str)
{
std::string _str = str;
boost::algorithm::to_upper(_str);
return _str;
}
// utility for printing messages into stdout
template<class... T>