1 #ifndef _KVI_QSTRING_H_
2 #define _KVI_QSTRING_H_
136 extern KVILIB_API bool equalCSN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
147 extern KVILIB_API bool equalCSN(
const QString & sz1,
const char * pc2,
unsigned int uLen);
158 extern KVILIB_API bool equalCIN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
169 extern KVILIB_API bool equalCIN(
const QString & sz1,
const char * pc2,
unsigned int uLen);
181 extern KVILIB_API bool equalCIN(
const QString & sz1,
const QChar * pC2,
unsigned int uLen);
195 extern KVILIB_API int cmpCI(
const QString & sz1,
const QString & sz2,
bool bNonAlphaGreater =
false);
210 extern KVILIB_API int cmpCIN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
239 extern KVILIB_API bool matchString(
const QString & szExp,
const QString & szStr,
bool bIsRegExp =
false,
bool bExact =
false,
bool bCs =
false);
376 extern KVILIB_API void cutToFirst(QString & szSrc,
const QChar &
c,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
388 extern KVILIB_API void cutToFirst(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
400 extern KVILIB_API void cutToLast(QString & szSrc,
const QChar &
c,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
412 extern KVILIB_API void cutToLast(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
426 extern KVILIB_API QString
leftToFirst(QString & szSrc,
const QChar &
c,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
440 extern KVILIB_API QString
leftToFirst(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
454 extern KVILIB_API QString
leftToLast(QString & szSrc,
const QChar &
c,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
468 extern KVILIB_API QString
leftToLast(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
499 extern KVILIB_API void transliterate(QString & szSrc,
const QString & szToFind,
const QString & szReplacement);
507 extern KVILIB_API void bufferToHex(QString & szRetBuffer,
const unsigned char * pcBuffer,
unsigned int uLen);
532 #if SYSTEM_SIZE_OF_LONG_INT == 8
533 return szNumber.toLong(bOk);
535 return szNumber.toLongLong(bOk);
547 #if SYSTEM_SIZE_OF_LONG_INT == 8
548 return szNumber.toULong(bOk);
550 return szNumber.toULongLong(bOk);
555 #endif //_KVI_QSTRING_H_
bool matchWildExpressions(const QString &szM1, const QString &szM2)
Matches two strings containging wildcards (* and ?)
Definition: KviQString.cpp:942
Definition: KviQString.h:56
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
Definition: KviQString.h:58
void appendFormatted(QString &szSrc, QString szFmt,...)
Appends a formatted string.
Definition: KviQString.cpp:931
kvi_u64_t toU64(QString &szNumber, bool *bOk)
Return the string converted to an unsigned long.
Definition: KviQString.h:545
bool matchString(const QString &szExp, const QString &szStr, bool bIsRegExp, bool bExact, bool bCs)
Matches two string containging wildcards (* and ?) or regular expressions.
Definition: KviQString.cpp:1073
void stripRight(QString &szSrc, const QChar &c)
Trims all c chars at the end of the given string.
Definition: KviQString.cpp:553
void appendNumber(QString &szSrc, double dReal)
Appends the given number to the source string.
Definition: KviQString.cpp:593
void escapeKvs(QString *szData, uint uFlags)
Escapes any kvs special character from a string.
Definition: KviQString.cpp:1316
EscapeKVSFlags
Holds the flags to escape KVS.
Definition: KviQString.h:53
QString makeSizeReadable(quint64 bytes)
Returns a readable size in byte's multiples.
Definition: KviQString.cpp:225
#define kvi_va_list
Definition: kvi_stdarg.h:31
kvi_i64_t toI64(QString &szNumber, bool *bOk)
Return the string converted to a long.
Definition: KviQString.h:530
void cutToLast(QString &szSrc, const QChar &c, bool bIncluded, bool bClearIfNotFound)
Cuts the string until the last occurrence of the given char is found.
Definition: KviQString.cpp:1172
bool equalCIN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case insensitive up to N chars.
Definition: KviQString.cpp:86
void vsprintf(QString &szSrc, const QString &szFmt, kvi_va_list list)
Writes to the character string.
Definition: KviQString.cpp:634
QString lowerISO88591(const QString &szSrc)
Returns an ISO-8859-1 lower case string.
Definition: KviQString.cpp:1254
int cmpCIN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case insensitive up to N chars.
Definition: KviQString.cpp:447
void stripRightWhiteSpace(QString &szSrc)
Trims all the whitespaces at the end of the given string.
Definition: KviQString.cpp:533
void transliterate(QString &szSrc, const QString &szToFind, const QString &szReplacement)
Replaces a string with another.
Definition: KviQString.cpp:1282
unsigned long long int kvi_u64_t
Definition: kvi_inttypes.h:66
void cutToFirst(QString &szSrc, const QChar &c, bool bIncluded, bool bClearIfNotFound)
Cuts the string until the first occurrence of the given char is found.
Definition: KviQString.cpp:1148
const QString Empty
A global empty string (note that this is ALSO NULL under Qt 3.x)
Definition: KviQString.cpp:49
void cutFromFirst(QString &szSrc, const QChar &c, bool bIncluded)
Cuts the string after the first occurrence of the given char.
Definition: KviQString.cpp:1114
QString leftToFirst(QString &szSrc, const QChar &c, bool bIncluded, bool bReturnFullStringIfNotFound)
Returns the string up to the the first occurrence of the given char.
Definition: KviQString.cpp:1196
void stripLeft(QString &szSrc, const QChar &c)
Trims all c chars at the start of the given string.
Definition: KviQString.cpp:573
bool equalCSN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case sensitive up to N chars.
Definition: KviQString.cpp:53
void bufferToHex(QString &szRetBuffer, const unsigned char *pcBuffer, unsigned int uLen)
Returns an hexadecimal converted string starting from a buffer.
Definition: KviQString.cpp:1302
Definition: KviQString.h:59
Definition: KviQString.h:55
QString getToken(QString &szSrc, const QChar &sep)
Returns a token from a string.
Definition: KviQString.cpp:493
int cmpCI(const QString &sz1, const QString &sz2, bool bNonAlphaGreater)
Compares two strings with case insensitive.
Definition: KviQString.cpp:385
QString toHtmlEscaped(QString szData)
Escapes any html special character from a string (wrapper to QString::toHtmlEscaped) ...
Definition: KviQString.cpp:1341
QString leftToLast(QString &szSrc, const QChar &c, bool bIncluded, bool bReturnFullStringIfNotFound)
Returns the string up to the last occurrence of the given char.
Definition: KviQString.cpp:1212
long long int kvi_i64_t
SYSTEM_SIZE_OF_SHORT_INT.
Definition: kvi_inttypes.h:65
void cutFromLast(QString &szSrc, const QChar &c, bool bIncluded)
Cuts the string after the last occurrence of the given char.
Definition: KviQString.cpp:1131
bool equalCI(const QString &sz1, const QString &sz2)
Compares two strings with case insensitive.
Definition: KviQString.cpp:285
Definition: KviQString.h:57
This file contains compile time settings.
QString upperISO88591(const QString &szSrc)
Returns an ISO-8859-1 upper case string.
Definition: KviQString.cpp:1228
bool equalCS(const QString &sz1, const QString &sz2)
Compares two strings with case sensitive.
Definition: KviQString.cpp:257
void ensureLastCharIs(QString &szSrc, const QChar &c)
Ensures the last char of a string is the given char.
Definition: KviQString.cpp:485
#define KVILIB_API
Definition: kvi_settings.h:125