concordia-library/concordia/common/text_utils.cpp
rjawor e99eb77b28 anonymizing sentences
Former-commit-id: 5d8bd7e16258fda7c02a7cc0e1da589d73418f0d
2014-04-29 14:46:04 +02:00

20 lines
599 B
C++

#include "concordia/common/text_utils.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/locale.hpp>
TextUtils::TextUtils() {
_lowerConverter =
StringCaseConverterManager::getInstance().getLowerCaseConverter("pl");
_upperConverter =
StringCaseConverterManager::getInstance().getUpperCaseConverter("pl");
}
string TextUtils::toLowerCase(const string & text) {
return simpleConvert(*_lowerConverter, text);
}
string TextUtils::toUpperCase(const string & text) {
return simpleConvert(*_upperConverter, text);
}