rewrite xml stuff #2 - will be testing the monsters xml code soon

This commit is contained in:
niczkx
2012-07-18 08:04:27 +02:00
committed by Eduardo Bart
parent b7b88dd117
commit c8d1d5ecf2
9 changed files with 117 additions and 355 deletions

View File

@@ -216,17 +216,25 @@ inline std::string utf8StringToLatin1(uchar *utf8) {
// Convert string to lower case
inline std::string tolower(const std::string& str)
{
std::string _str = str;
boost::algorithm::to_lower(_str);
return _str;
std::string cpy = str;
boost::algorithm::to_lower(cpy);
return cpy;
}
// Convert string to upper case
inline std::string toupper(const std::string& str)
{
std::string _str = str;
boost::algorithm::to_upper(_str);
return _str;
std::string cpy = str;
boost::algorithm::to_upper(cpy);
return cpy;
}
// Trim string
inline std::string trim(const std::string& str)
{
std::string cpy = str;
boost::algorithm::trim(cpy);
return cpy;
}
// utility for printing messages into stdout