Skip to content

Commit

Permalink
Use boost for toUpper for correct accent handling
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghead committed Feb 11, 2018
1 parent b04e2da commit 588f81f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions es-core/src/utils/StringUtil.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "utils/StringUtil.h"

#include <algorithm>
#include <boost/locale.hpp>

namespace Utils
{
Expand Down Expand Up @@ -136,13 +137,7 @@ namespace Utils

std::string toUpper(const std::string& _string)
{
std::string string;

for(size_t i = 0; i < _string.length(); ++i)
string += (char)toupper(_string[i]);

return string;

return boost::locale::to_upper(_string);
} // toUpper

std::string trim(const std::string& _string)
Expand Down

0 comments on commit 588f81f

Please sign in to comment.