1 | /* -*- c++ -*- |
2 | Copyright (c) 2005 Ingo Kloecker <kloecker@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License as published by the Free Software Foundation; either |
7 | version 2 of the License, or (at your option) any later version. |
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 | |
20 | #ifndef KASCII_H |
21 | #define KASCII_H |
22 | |
23 | #include <kdecore_export.h> |
24 | |
25 | /** |
26 | * Locale-independent qstricmp. Use this for comparing ascii keywords |
27 | * in a case-insensitive way. |
28 | * qstricmp fails with e.g. the Turkish locale where 'I'.toLower() != 'i' |
29 | */ |
30 | KDECORE_EXPORT int kasciistricmp( const char *str1, const char *str2 ); |
31 | |
32 | /** |
33 | Locale-independent function to convert ASCII strings to lower case ASCII |
34 | strings. This means that it affects @em only the ASCII characters A-Z. |
35 | |
36 | @param str pointer to the string which should be converted to lower case |
37 | @return pointer to the converted string (same as @a str) |
38 | */ |
39 | KDECORE_EXPORT char * kAsciiToLower( char *str ); |
40 | |
41 | /** |
42 | Locale-independent function to convert ASCII strings to upper case ASCII |
43 | strings. This means that it affects @em only the ASCII characters a-z. |
44 | |
45 | @param str pointer to the string which should be converted to upper case |
46 | @return pointer to the converted string (same as @a str) |
47 | */ |
48 | KDECORE_EXPORT char * kAsciiToUpper( char *str ); |
49 | |
50 | #endif |
51 | |