KDECore
kstringhandler.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KSTRINGHANDLER_H
00022 #define KSTRINGHANDLER_H
00023
00024 #include <kdecore_export.h>
00025
00026 #include <QtCore/qnamespace.h>
00027
00028 class QChar;
00029 class QRegExp;
00030 class QString;
00031 class QStringList;
00032
00059 namespace KStringHandler
00060 {
00061
00067 KDECORE_EXPORT QString capwords( const QString &text );
00068
00074 KDECORE_EXPORT QStringList capwords( const QStringList &list );
00075
00082 KDECORE_EXPORT QString lsqueeze( const QString & str, int maxlen = 40 );
00083
00090 KDECORE_EXPORT QString csqueeze( const QString & str, int maxlen = 40 );
00091
00098 KDECORE_EXPORT QString rsqueeze( const QString & str, int maxlen = 40 );
00099
00117 KDECORE_EXPORT QStringList perlSplit( const QString & sep,
00118 const QString & s,
00119 int max = 0 );
00120
00138 KDECORE_EXPORT QStringList perlSplit( const QChar & sep,
00139 const QString & s,
00140 int max = 0 );
00141
00159 KDECORE_EXPORT QStringList perlSplit( const QRegExp & sep,
00160 const QString & s,
00161 int max = 0);
00162
00169 KDECORE_EXPORT QString tagUrls( const QString& text );
00170
00183 KDECORE_EXPORT QString obscure( const QString &str );
00184
00185
00192 KDECORE_EXPORT bool isUtf8( const char *str );
00193
00203 KDECORE_EXPORT QString from8Bit( const char *str );
00204
00216 KDECORE_EXPORT int naturalCompare( const QString& a, const QString& b, Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive );
00217 }
00218 #endif