KVIrc  4.9.2
DeveloperAPIs
Namespaces | Enumerations | Functions
KviQString.h File Reference

Helper functions for the QString class. More...

#include "kvi_settings.h"
#include "kvi_inttypes.h"
#include "kvi_stdarg.h"
#include <QString>
#include <QByteArray>

Go to the source code of this file.

Namespaces

 KviQString
 A namespace for QString helper functions.
 

Enumerations

enum  KviQString::EscapeKVSFlags {
  KviQString::EscapeSpace = 1, KviQString::PermitVariables = 2, KviQString::PermitFunctions = 4, KviQString::PermitMultiLine = 8,
  KviQString::EscapeParenthesis = 16
}
 Holds the flags to escape KVS. More...
 

Functions

void KviQString::appendFormatted (QString &szSrc, QString szFmt,...)
 Appends a formatted string. More...
 
void KviQString::appendNumber (QString &szSrc, double dReal)
 Appends the given number to the source string. More...
 
void KviQString::appendNumber (QString &szSrc, int iInteger)
 Appends the given number to the source string. More...
 
void KviQString::appendNumber (QString &szSrc, kvi_i64_t iInteger)
 Appends the given number to the source string. More...
 
void KviQString::appendNumber (QString &szSrc, kvi_u64_t uInteger)
 Appends the given number to the source string. More...
 
void KviQString::appendNumber (QString &szSrc, unsigned int uInteger)
 Appends the given number to the source string. More...
 
void KviQString::bufferToHex (QString &szRetBuffer, const unsigned char *pcBuffer, unsigned int uLen)
 Returns an hexadecimal converted string starting from a buffer. More...
 
int KviQString::cmpCI (const QString &sz1, const QString &sz2, bool bNonAlphaGreater=false)
 Compares two strings with case insensitive. More...
 
int KviQString::cmpCIN (const QString &sz1, const QString &sz2, unsigned int uLen)
 Compares two strings with case insensitive up to N chars. More...
 
void KviQString::cutFromFirst (QString &szSrc, const QChar &c, bool bIncluded=true)
 Cuts the string after the first occurrence of the given char. More...
 
void KviQString::cutFromFirst (QString &szSrc, const QString &szFind, bool bIncluded=true)
 Cuts the string after the first occurrence of the given char. More...
 
void KviQString::cutFromLast (QString &szSrc, const QChar &c, bool bIncluded=true)
 Cuts the string after the last occurrence of the given char. More...
 
void KviQString::cutFromLast (QString &szSrc, const QString &szFind, bool bIncluded=true)
 Cuts the string after the last occurrence of the given char. More...
 
void KviQString::cutToFirst (QString &szSrc, const QChar &c, bool bIncluded=true, bool bClearIfNotFound=false)
 Cuts the string until the first occurrence of the given char is found. More...
 
void KviQString::cutToFirst (QString &szSrc, const QString &szFind, bool bIncluded=true, bool bClearIfNotFound=false)
 Cuts the string until the first occurrence of the given char is found. More...
 
void KviQString::cutToLast (QString &szSrc, const QChar &c, bool bIncluded=true, bool bClearIfNotFound=false)
 Cuts the string until the last occurrence of the given char is found. More...
 
void KviQString::cutToLast (QString &szSrc, const QString &szFind, bool bIncluded=true, bool bClearIfNotFound=false)
 Cuts the string until the last occurrence of the given char is found. More...
 
void KviQString::ensureLastCharIs (QString &szSrc, const QChar &c)
 Ensures the last char of a string is the given char. More...
 
bool KviQString::equalCI (const QString &sz1, const QString &sz2)
 Compares two strings with case insensitive. More...
 
bool KviQString::equalCI (const QString &sz1, const QChar *pC2)
 Compares two strings with case insensitive. More...
 
bool KviQString::equalCI (const QString &sz1, const char *pc2)
 Compares two strings with case insensitive. More...
 
bool KviQString::equalCIN (const QString &sz1, const QString &sz2, unsigned int uLen)
 Compares two strings with case insensitive up to N chars. More...
 
bool KviQString::equalCIN (const QString &sz1, const char *pc2, unsigned int uLen)
 Compares two strings with case insensitive up to N chars. More...
 
bool KviQString::equalCIN (const QString &sz1, const QChar *pC2, unsigned int uLen)
 Compares two strings with case insensitive up to N chars. More...
 
bool KviQString::equalCS (const QString &sz1, const QString &sz2)
 Compares two strings with case sensitive. More...
 
bool KviQString::equalCS (const QString &sz1, const char *pc2)
 Compares two strings with case sensitive. More...
 
bool KviQString::equalCSN (const QString &sz1, const QString &sz2, unsigned int uLen)
 Compares two strings with case sensitive up to N chars. More...
 
bool KviQString::equalCSN (const QString &sz1, const char *pc2, unsigned int uLen)
 Compares two strings with case sensitive up to N chars. More...
 
void KviQString::escapeKvs (QString *szData, uint uFlags=0)
 Escapes any kvs special character from a string. More...
 
QString KviQString::getToken (QString &szSrc, const QChar &sep)
 Returns a token from a string. More...
 
QString KviQString::leftToFirst (QString &szSrc, const QChar &c, bool bIncluded=true, bool bReturnFullStringIfNotFound=true)
 Returns the string up to the the first occurrence of the given char. More...
 
QString KviQString::leftToFirst (QString &szSrc, const QString &szFind, bool bIncluded=true, bool bReturnFullStringIfNotFound=true)
 Returns the string up to the first occurrence of the given string. More...
 
QString KviQString::leftToLast (QString &szSrc, const QChar &c, bool bIncluded=true, bool bReturnFullStringIfNotFound=true)
 Returns the string up to the last occurrence of the given char. More...
 
QString KviQString::leftToLast (QString &szSrc, const QString &szFind, bool bIncluded=true, bool bReturnFullStringIfNotFound=true)
 Returns the string up to the last occurrence of the given string. More...
 
QString KviQString::lowerISO88591 (const QString &szSrc)
 Returns an ISO-8859-1 lower case string. More...
 
QString KviQString::makeSizeReadable (quint64 size)
 Returns a readable size in byte's multiples. More...
 
bool KviQString::matchString (const QString &szExp, const QString &szStr, bool bIsRegExp=false, bool bExact=false, bool bCs=false)
 Matches two string containging wildcards (* and ?) or regular expressions. More...
 
bool KviQString::matchWildExpressions (const QString &szM1, const QString &szM2)
 Matches two strings containging wildcards (* and ?) More...
 
void KviQString::stripLeft (QString &szSrc, const QChar &c)
 Trims all c chars at the start of the given string. More...
 
void KviQString::stripRight (QString &szSrc, const QChar &c)
 Trims all c chars at the end of the given string. More...
 
void KviQString::stripRightWhiteSpace (QString &szSrc)
 Trims all the whitespaces at the end of the given string. More...
 
QString KviQString::toHtmlEscaped (QString szData)
 Escapes any html special character from a string (wrapper to QString::toHtmlEscaped) More...
 
kvi_i64_t KviQString::toI64 (QString &szNumber, bool *bOk)
 Return the string converted to a long. More...
 
kvi_u64_t KviQString::toU64 (QString &szNumber, bool *bOk)
 Return the string converted to an unsigned long. More...
 
void KviQString::transliterate (QString &szSrc, const QString &szToFind, const QString &szReplacement)
 Replaces a string with another. More...
 
QString KviQString::upperISO88591 (const QString &szSrc)
 Returns an ISO-8859-1 upper case string. More...
 
void KviQString::vsprintf (QString &szSrc, const QString &szFmt, kvi_va_list list)
 Writes to the character string. More...
 

Detailed Description

Helper functions for the QString class.

Author
Szymon Stefanek