make helper function for trimming a twitch channel name from irc

This commit is contained in:
Rasmus Karlsson
2018-03-25 11:37:57 +02:00
committed by fourtf
parent 9886021c6a
commit 6e1096710d
7 changed files with 68 additions and 24 deletions
+22
View File
@@ -0,0 +1,22 @@
#include "providers/twitch/twitchhelpers.hpp"
#include "debug/log.hpp"
namespace chatterino {
namespace providers {
namespace twitch {
bool TrimChannelName(const QString &channelName, QString &outChannelName)
{
if (channelName.length() < 3) {
debug::Log("channel name length below 2");
return false;
}
outChannelName = channelName.mid(1);
return true;
}
} // namespace twitch
} // namespace providers
} // namespace chatterino