Channel names are case insensitive
But some servers (epiknet for example) send channel names with an uppercase
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user