Day 26/100 100 Days of Code

Photo by Umberto on Unsplash

Day 26/100 100 Days of Code

Info Hunter

I fixed an issue where it was impossible to lowercase any Greek characters. After experimenting with C++'s library, I decided to install the boost locale library to try it.

Lo' and behold! It worked! This means that both Greek and English languages are supported. Windows support might have problems as I might have to use wide strings instead. Fixing the problem required a few lines of code:

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

boost::locale::generator gen;
std::string keywordLowercase = boost::locale::to_lower(keyword);

I am not a fan of adding a new dependency for such a small task. But I was unable to find a good solution.