2014-04-24 08:36:48 +02:00
|
|
|
#include "concordia/common/text_utils.hpp"
|
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
#include <boost/algorithm/string/case_conv.hpp>
|
|
|
|
#include <boost/locale.hpp>
|
|
|
|
|
2014-04-24 14:26:35 +02:00
|
|
|
TextUtils::TextUtils() {
|
|
|
|
_lowerConverter =
|
|
|
|
StringCaseConverterManager::getInstance().getLowerCaseConverter("pl");
|
|
|
|
_upperConverter =
|
|
|
|
StringCaseConverterManager::getInstance().getUpperCaseConverter("pl");
|
|
|
|
}
|
2014-04-29 14:46:04 +02:00
|
|
|
|
2014-04-24 08:36:48 +02:00
|
|
|
string TextUtils::toLowerCase(const string & text) {
|
2014-04-24 14:26:35 +02:00
|
|
|
return simpleConvert(*_lowerConverter, text);
|
2014-04-24 08:36:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
string TextUtils::toUpperCase(const string & text) {
|
2014-04-24 14:26:35 +02:00
|
|
|
return simpleConvert(*_upperConverter, text);
|
2014-04-24 08:36:48 +02:00
|
|
|
}
|