-rw-r--r-- | library/backend/stringutil.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/library/backend/stringutil.h b/library/backend/stringutil.h new file mode 100644 index 0000000..e9daf70 --- a/dev/null +++ b/library/backend/stringutil.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free | ||
8 | ** Software Foundation and appearing in the file LICENSE.GPL included | ||
9 | ** in the packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING | ||
12 | ** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A | ||
13 | ** PARTICULAR PURPOSE. | ||
14 | ** | ||
15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
16 | ** | ||
17 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
18 | ** not clear to you. | ||
19 | ** | ||
20 | **********************************************************************/ | ||
21 | |||
22 | |||
23 | #ifndef QTPALMTOP_stringutil_h__ | ||
24 | #define QTPALMTOP_stringutil_h__ | ||
25 | |||
26 | #include <qstring.h> | ||
27 | #include "qpcglobal.h" | ||
28 | |||
29 | namespace Qtopia | ||
30 | { | ||
31 | |||
32 | // Simplifies white space within each line but keeps the new line characters | ||
33 | QString QPC_EXPORT simplifyMultiLineSpace( const QString &multiLine ); | ||
34 | |||
35 | // Creates a QString which doesn't contain any "dangerous" | ||
36 | // characters (i.e. <, >, &, ") | ||
37 | QString QPC_EXPORT escapeString( const QString& plain ); | ||
38 | |||
39 | // Takes a UTF-8!! string and removes all the XML thingies (entities?) | ||
40 | // from the string and also calls fromUtf8() on it... so make sure | ||
41 | // to pass a QCString/const char* with UTF-8 data only | ||
42 | QString QPC_EXPORT plainString( const char* escaped, unsigned int length ); | ||
43 | QString QPC_EXPORT plainString( const QCString& string ); | ||
44 | |||
45 | QString QPC_EXPORT plainString( const QString& string ); | ||
46 | |||
47 | |||
48 | // collation functions | ||
49 | int compare( const QString & s1, const QString & s2 ); | ||
50 | QString buildSortKey( const QString & s ); | ||
51 | QString buildSortKey( const QString & s1, const QString & s2 ); | ||
52 | QString buildSortKey( const QString & s1, const QString & s2, | ||
53 | const QString & s3 ); | ||
54 | |||
55 | } | ||
56 | |||
57 | #endif | ||