137 extern KVILIB_API bool equalCSN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
148 extern KVILIB_API bool equalCSN(
const QString & sz1,
const char * pc2,
unsigned int uLen);
159 extern KVILIB_API bool equalCIN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
170 extern KVILIB_API bool equalCIN(
const QString & sz1,
const char * pc2,
unsigned int uLen);
182 extern KVILIB_API bool equalCIN(
const QString & sz1,
const QChar * pC2,
unsigned int uLen);
196 extern KVILIB_API int cmpCI(
const QString & sz1,
const QString & sz2,
bool bNonAlphaGreater =
false);
211 extern KVILIB_API int cmpCIN(
const QString & sz1,
const QString & sz2,
unsigned int uLen);
240 extern KVILIB_API bool matchString(
const QString & szExp,
const QString & szStr,
bool bIsRegExp =
false,
bool bExact =
false,
bool bCs =
false);
377 extern KVILIB_API void cutToFirst(QString & szSrc,
const QChar & c,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
389 extern KVILIB_API void cutToFirst(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
401 extern KVILIB_API void cutToLast(QString & szSrc,
const QChar & c,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
413 extern KVILIB_API void cutToLast(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bClearIfNotFound =
false);
427 extern KVILIB_API QString
leftToFirst(QString & szSrc,
const QChar & c,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
441 extern KVILIB_API QString
leftToFirst(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
455 extern KVILIB_API QString
leftToLast(QString & szSrc,
const QChar & c,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
469 extern KVILIB_API QString
leftToLast(QString & szSrc,
const QString & szFind,
bool bIncluded =
true,
bool bReturnFullStringIfNotFound =
true);
500 extern KVILIB_API void transliterate(QString & szSrc,
const QString & szToFind,
const QString & szReplacement);
508 extern KVILIB_API void bufferToHex(QString & szRetBuffer,
const unsigned char * pcBuffer,
unsigned int uLen);
533#if SYSTEM_SIZE_OF_LONG_INT == 8
534 return szNumber.toLong(bOk);
536 return szNumber.toLongLong(bOk);
548#if SYSTEM_SIZE_OF_LONG_INT == 8
549 return szNumber.toULong(bOk);
551 return szNumber.toULongLong(bOk);
long long int kvi_i64_t
SYSTEM_SIZE_OF_SHORT_INT.
Definition kvi_inttypes.h:65
unsigned long long int kvi_u64_t
Definition kvi_inttypes.h:66
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
#define kvi_va_list
Definition kvi_stdarg.h:30
A namespace for QString helper functions.
Definition KviQString.cpp:45
void ensureLastCharIs(QString &szSrc, const QChar &c)
Ensures the last char of a string is the given char.
Definition KviQString.cpp:483
kvi_u64_t toU64(QString &szNumber, bool *bOk)
Return the string converted to an unsigned long.
Definition KviQString.h:546
QString toHtmlEscaped(QString szData)
Escapes any html special character from a string (wrapper to QString::toHtmlEscaped)
Definition KviQString.cpp:1339
void stripLeft(QString &szSrc, const QChar &c)
Trims all c chars at the start of the given string.
Definition KviQString.cpp:571
void escapeKvs(QString *szData, uint uFlags)
Escapes any kvs special character from a string.
Definition KviQString.cpp:1314
QString getToken(QString &szSrc, const QChar &sep)
Returns a token from a string.
Definition KviQString.cpp:491
kvi_i64_t toI64(QString &szNumber, bool *bOk)
Return the string converted to a long.
Definition KviQString.h:531
void vsprintf(QString &szSrc, const QString &szFmt, kvi_va_list list)
Writes to the character string.
Definition KviQString.cpp:632
int cmpCI(const QString &sz1, const QString &sz2, bool bNonAlphaGreater)
Compares two strings with case insensitive.
Definition KviQString.cpp:383
void bufferToHex(QString &szRetBuffer, const unsigned char *pcBuffer, unsigned int uLen)
Returns an hexadecimal converted string starting from a buffer.
Definition KviQString.cpp:1300
void cutFromLast(QString &szSrc, const QChar &c, bool bIncluded)
Cuts the string after the last occurrence of the given char.
Definition KviQString.cpp:1129
QString upperISO88591(const QString &szSrc)
Returns an ISO-8859-1 upper case string.
Definition KviQString.cpp:1226
QString makeSizeReadable(quint64 bytes)
Returns a readable size in byte's multiples.
Definition KviQString.cpp:223
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:1170
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:1071
int cmpCIN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case insensitive up to N chars.
Definition KviQString.cpp:445
void cutFromFirst(QString &szSrc, const QChar &c, bool bIncluded)
Cuts the string after the first occurrence of the given char.
Definition KviQString.cpp:1112
EscapeKVSFlags
Holds the flags to escape KVS.
Definition KviQString.h:55
@ EscapeSpace
Definition KviQString.h:56
@ PermitVariables
Definition KviQString.h:57
@ EscapeParenthesis
Definition KviQString.h:60
@ PermitMultiLine
Definition KviQString.h:59
@ PermitFunctions
Definition KviQString.h:58
void appendFormatted(QString &szSrc, QString szFmt,...)
Appends a formatted string.
Definition KviQString.cpp:929
void stripRight(QString &szSrc, const QChar &c)
Trims all c chars at the end of the given string.
Definition KviQString.cpp:551
const QString Empty
A global empty string (note that this is ALSO NULL under Qt 3.x)
Definition KviQString.cpp:47
void appendNumber(QString &szSrc, double dReal)
Appends the given number to the source string.
Definition KviQString.cpp:591
bool matchWildExpressions(const QString &szM1, const QString &szM2)
Matches two strings containging wildcards (* and ?)
Definition KviQString.cpp:940
bool equalCSN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case sensitive up to N chars.
Definition KviQString.cpp:51
bool equalCS(const QString &sz1, const QString &sz2)
Compares two strings with case sensitive.
Definition KviQString.cpp:255
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:1210
void stripRightWhiteSpace(QString &szSrc)
Trims all the whitespaces at the end of the given string.
Definition KviQString.cpp:531
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:1146
void transliterate(QString &szSrc, const QString &szToFind, const QString &szReplacement)
Replaces a string with another.
Definition KviQString.cpp:1280
bool equalCI(const QString &sz1, const QString &sz2)
Compares two strings with case insensitive.
Definition KviQString.cpp:283
QString lowerISO88591(const QString &szSrc)
Returns an ISO-8859-1 lower case string.
Definition KviQString.cpp:1252
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:1194
bool equalCIN(const QString &sz1, const QString &sz2, unsigned int uLen)
Compares two strings with case insensitive up to N chars.
Definition KviQString.cpp:84