concordia-library/concordia/common/text_utils.cpp
rjawor 9358863f8d text utils stub
Former-commit-id: d4459220f5696839d98848e9c30a61c084763a91
2014-04-24 08:36:48 +02:00

30 lines
677 B
C++

#include "concordia/common/text_utils.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/locale.hpp>
using namespace boost::locale;
string TextUtils::toLowerCase(const string & text) {
generator gen;
locale loc=gen("pl_PL.UTF-8");
locale::global(loc);
cout.imbue(loc);
string result = text;
boost::locale::to_lower(result);
return result;
}
string TextUtils::toUpperCase(const string & text) {
generator gen;
locale loc=gen("pl_PL.UTF-8");
locale::global(loc);
cout.imbue(loc);
string result = text;
boost::locale::to_upper(result);
return result;
}