wrong character in the GSM 03.38 table (ç for Ç)
[gammu.git] / helper / string.h
blob7c314572f55343ad3fa21b3edec47c45e195c8a1
1 /**
2 * Compatibility layer for string operations on different platforms.
3 */
5 #ifndef __helper__string_h__
6 #define __helper__string_h__
8 #ifndef _GNU_SOURCE
9 # define _GNU_SOURCE
10 #endif
12 #include <gammu-config.h>
14 #include <string.h>
16 #ifdef HAVE_STRINGS_H
17 #include <strings.h>
18 #endif
21 #ifndef HAVE_STRCASESTR
22 /**
23 * Case insensitive substring location, libc compatibility.
25 * \ingroup Unicode
27 extern char *strcasestr(const char *s, const char *find);
28 #endif
30 #ifndef HAVE_STRCHRNUL
31 extern char *strchrnul(char *s, int find);
32 #endif
34 #ifndef HAVE_STRNCASECMP
35 #ifdef HAVE_STRNICMP
36 #define strncasecmp _strnicmp
37 #else
38 # define INTERNAL_STRNCASECMP
39 extern int strncasecmp (const char *s1, const char *s2, size_t n);
40 #endif
41 #endif
43 #ifndef HAVE_STRCASECMP
44 #ifdef HAVE_STRICMP
45 #define strcasecmp _stricmp
46 #else
47 # define INTERNAL_STRCASECMP
48 /**
49 * Case insensitive string comparing, libc compatibility.
51 * \ingroup Unicode
53 extern int strcasecmp (const char *s1, const char *s2);
54 #endif
55 #endif
57 #ifndef HAVE_TOWLOWER
58 wchar_t towlower (wchar_t c);
59 #endif
60 #endif