• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
kstringhandler.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Ian Zepp (icszepp@islc.net)
3  Copyright (C) 2000 Rik Hemsley (rikkus) <rik@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #ifndef KSTRINGHANDLER_H
20 #define KSTRINGHANDLER_H
21 
22 #include <tqstring.h>
23 #include <tqstringlist.h>
24 #include <tqregexp.h> // for the word ranges
25 #include <tqfontmetrics.h>
26 #include "tdelibs_export.h"
27 
69 class TDECORE_EXPORT KStringHandler
70 {
71 public:
80  static TQString word( const TQString &text , uint pos ) KDE_DEPRECATED;
81 
94  static TQString word( const TQString &text , const char *range );
95 
105  static TQString insword( const TQString &text , const TQString &word , uint pos );
106 
116  static TQString setword( const TQString &text , const TQString &word , uint pos );
117 
130  static TQString remrange( const TQString &text , const char *range );
131 
132 
139  static TQString remword( const TQString &text , uint pos );
140 
147  static TQString remword( const TQString &text , const TQString &word );
148 
154  static TQString capwords( const TQString &text );
155 
161  static TQStringList capwords( const TQStringList &list );
162 
168  static TQString reverse( const TQString &text );
169 
175  static TQStringList reverse( const TQStringList &list );
176 
186  static TQString ljust( const TQString &text , uint width ) KDE_DEPRECATED;
187 
197  static TQString rjust( const TQString &text , uint width ) KDE_DEPRECATED;
198 
207  static TQString center( const TQString &text , uint width );
208 
215  static TQString lsqueeze( const TQString & str, uint maxlen = 40 );
216 
227  static TQString lEmSqueeze( const TQString & name,
228  const TQFontMetrics& fontMetrics,
229  uint maxlen = 30 );
230 
240  static TQString lPixelSqueeze( const TQString & name,
241  const TQFontMetrics& fontMetrics,
242  uint maxPixels );
243 
250  static TQString csqueeze( const TQString & str, uint maxlen = 40 );
251 
262  static TQString cEmSqueeze( const TQString & name,
263  const TQFontMetrics& fontMetrics,
264  uint maxlen = 30 );
265 
275  static TQString cPixelSqueeze( const TQString & name,
276  const TQFontMetrics& fontMetrics,
277  uint maxPixels );
278 
285  static TQString rsqueeze( const TQString & str, uint maxlen = 40 );
286 
297  static TQString rEmSqueeze( const TQString & name,
298  const TQFontMetrics& fontMetrics,
299  uint maxlen = 30 );
300 
310  static TQString rPixelSqueeze( const TQString & name,
311  const TQFontMetrics& fontMetrics,
312  uint maxPixels );
313 
322  static bool matchFileName( const TQString& filename, const TQString& pattern );
323  // KDE4: move to KShell
324 
342  static TQStringList perlSplit
343  (const TQString & sep, const TQString & s, uint max = 0);
344 
362  static TQStringList perlSplit
363  (const TQChar & sep, const TQString & s, uint max = 0);
364 
382  static TQStringList perlSplit
383  (const TQRegExp & sep, const TQString & s, uint max = 0);
384 
393  static TQString tagURLs( const TQString& text );
394 
408  static TQString obscure( const TQString &str );
409 
417  static bool isUtf8( const char *str );
418 
427  static TQString from8Bit( const char *str );
428 
429 #ifdef KDE_NO_COMPAT
430 private:
431 #endif
432 
435  static KDE_DEPRECATED bool matchFilename( const TQString& filename, const TQString& pattern )
436  {
437  return matchFileName (filename, pattern);
438  }
439 
440 };
441 #endif
KStringHandler::matchFilename
static KDE_DEPRECATED bool matchFilename(const TQString &filename, const TQString &pattern)
Definition: kstringhandler.h:435
KStringHandler
This class contains utility functions for handling strings.
Definition: kstringhandler.h:69

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.