Chatterino
Namespaces | Functions
Helpers.hpp File Reference
#include <QColor>
#include <QString>
#include <QStringRef>
#include <cmath>
Include dependency graph for Helpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 chatterino
 
 chatterino::_helpers_internal
 

Functions

int chatterino::_helpers_internal::skipSpace (const QStringRef &view, int startPos)
 
bool chatterino::_helpers_internal::matchesIgnorePlural (const QStringRef &word, const QString &singular)
 
std::pair< uint64_t, bool > chatterino::_helpers_internal::findUnitMultiplierToSec (const QStringRef &view, int &pos)
 
bool chatterino::startsWithOrContains (const QString &str1, const QString &str2, Qt::CaseSensitivity caseSensitivity, bool startsWith)
 startsWithOrContains is a wrapper for checking whether str1 starts with or contains str2 within itself More...
 
bool chatterino::isNeutral (const QString &s)
 isNeutral checks if the string doesn't contain any character in the unicode "letter" category i.e. if the string contains only neutral characters. More...
 
QString chatterino::generateUuid ()
 
QString chatterino::formatRichLink (const QString &url, bool file)
 
QString chatterino::formatRichNamedLink (const QString &url, const QString &name, bool file)
 
QString chatterino::shortenString (const QString &str, unsigned maxWidth)
 
QString chatterino::localizeNumbers (const int &number)
 
QString chatterino::kFormatNumbers (const int &number)
 
QColor chatterino::getRandomColor (const QString &userId)
 
int64_t chatterino::parseDurationToSeconds (const QString &inputString, uint64_t noUnitMultiplier)
 
QString chatterino::formatUserMention (const QString &userName, bool isFirstWord, bool mentionUsersWithComma)
 Takes a user's name and some formatting parameter and spits out the standardized way to format it. More...
 
template<typename T >
std::vector< T > chatterino::splitListIntoBatches (const T &list, int batchSize=100)