19 #ifndef KSTRINGHANDLER_H
20 #define KSTRINGHANDLER_H
23 #include <tqstringlist.h>
25 #include <tqfontmetrics.h>
26 #include "tdelibs_export.h"
80 static TQString word(
const TQString &text , uint pos ) TDE_DEPRECATED;
94 static TQString word(
const TQString &text ,
const char *range );
105 static TQString insword(
const TQString &text ,
const TQString &word , uint pos );
116 static TQString setword(
const TQString &text ,
const TQString &word , uint pos );
130 static TQString remrange(
const TQString &text ,
const char *range );
139 static TQString remword(
const TQString &text , uint pos );
147 static TQString remword(
const TQString &text ,
const TQString &word );
154 static TQString capwords(
const TQString &text );
161 static TQStringList capwords(
const TQStringList &list );
168 static TQString reverse(
const TQString &text );
175 static TQStringList reverse(
const TQStringList &list );
186 static TQString ljust(
const TQString &text , uint width ) TDE_DEPRECATED;
197 static TQString rjust(
const TQString &text , uint width ) TDE_DEPRECATED;
207 static TQString center(
const TQString &text , uint width );
215 static TQString lsqueeze(
const TQString & str, uint maxlen = 40 );
227 static TQString lEmSqueeze(
const TQString & name,
228 const TQFontMetrics& fontMetrics,
240 static TQString lPixelSqueeze(
const TQString & name,
241 const TQFontMetrics& fontMetrics,
250 static TQString csqueeze(
const TQString & str, uint maxlen = 40 );
262 static TQString cEmSqueeze(
const TQString & name,
263 const TQFontMetrics& fontMetrics,
275 static TQString cPixelSqueeze(
const TQString & name,
276 const TQFontMetrics& fontMetrics,
285 static TQString rsqueeze(
const TQString & str, uint maxlen = 40 );
297 static TQString rEmSqueeze(
const TQString & name,
298 const TQFontMetrics& fontMetrics,
310 static TQString rPixelSqueeze(
const TQString & name,
311 const TQFontMetrics& fontMetrics,
322 static bool matchFileName(
const TQString& filename,
const TQString& pattern );
342 static TQStringList perlSplit
343 (
const TQString & sep,
const TQString & s, uint max = 0);
362 static TQStringList perlSplit
363 (
const TQChar & sep,
const TQString & s, uint max = 0);
382 static TQStringList perlSplit
383 (
const TQRegExp & sep,
const TQString & s, uint max = 0);
393 static TQString tagURLs(
const TQString& text );
408 static TQString obscure(
const TQString &str );
417 static bool isUtf8(
const char *str );
427 static TQString from8Bit(
const char *str );
435 static TDE_DEPRECATED
bool matchFilename(
const TQString& filename,
const TQString& pattern )
437 return matchFileName (filename, pattern);
This class contains utility functions for handling strings.
static TDE_DEPRECATED bool matchFilename(const TQString &filename, const TQString &pattern)