MythTV  master
Namespaces | Functions
stringutil.h File Reference
#include <QByteArray>
#include <QString>
#include "mythbaseexp.h"
Include dependency graph for stringutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 StringUtil
 

Functions

MBASE_PUBLIC bool StringUtil::isValidUTF8 (const QByteArray &data)
 
QString StringUtil::intToPaddedString (int n, int width=2)
 Creates a zero padded string representation of an integer. More...
 
QString StringUtil::indentSpaces (unsigned int level, unsigned int size=4)
 
QString StringUtil::bool_to_string (bool val)
 This is equivalent to QVariant(bool).toString() More...
 
MBASE_PUBLIC int StringUtil::naturalCompare (const QString &_a, const QString &_b, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
 This method chops the input a and b into pieces of digits and non-digits (a1.05 becomes a | 1 | . More...
 
bool StringUtil::naturalSortCompare (const QString &a, const QString &b, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
 naturalCompare as a std::sort compatible function (ignoring the third parameter, which is never used). More...
 
MBASE_PUBLIC QString StringUtil::formatKBytes (int64_t sizeKB, int prec=1)
 
MBASE_PUBLIC QString StringUtil::formatBytes (int64_t sizeB, int prec=1)