Channel names are case insensitive

But some servers (epiknet for example) send channel names with an uppercase
This commit is contained in:
Florent Le Coz
2013-11-28 02:14:42 +01:00
parent 2921f53657
commit 1151c26c36
3 changed files with 30 additions and 6 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef TOLOWER_INCLUDED
# define TOLOWER_INCLUDED
#include <string>
namespace utils
{
std::string tolower(const std::string& original)
{
std::string res;
res.reserve(original.size());
for (const char c: original)
res += static_cast<char>(std::tolower(c));
return res;
}
}
#endif // SPLIT_INCLUDED