KDECore
kstringhandler.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1999 Ian Zepp (icszepp@islc.net) 00003 Copyright (C) 2000 Rik Hemsley (rikkus) <rik@kde.org> 00004 Copyright (C) 2006 by Dominic Battre <dominic@battre.de> 00005 Copyright (C) 2006 by Martin Pool <mbp@canonical.com> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License version 2 as published by the Free Software Foundation. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 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 00231 KDECORE_EXPORT QString preProcessWrap( const QString& text ); 00232 } 00233 #endif
KDE 4.6 API Reference