4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
8 #ifndef __WINE_STRING_H
9 #define __WINE_STRING_H
13 #ifndef _NLSCMP_DEFINED
14 #define _NLSCMPERROR ((unsigned int)0x7fffffff)
15 #define _NLSCMP_DEFINED
22 #define NULL ((void *)0)
30 #ifndef _CRT_MEMORY_DEFINED
31 #define _CRT_MEMORY_DEFINED
32 void* __cdecl
memchr(const void*,int,size_t);
33 int __cdecl
memcmp(const void*,const void*,size_t);
34 void* __cdecl
memcpy(void*,const void*,size_t);
35 void* __cdecl
memset(void*,int,size_t);
36 void* __cdecl
_memccpy(void*,const void*,int,unsigned int);
37 int __cdecl
_memicmp(const void*,const void*,unsigned int);
39 static inline int memicmp(const void* s1
, const void* s2
, size_t len
) { return _memicmp(s1
, s2
, len
); }
40 static inline void* memccpy(void *s1
, const void *s2
, int c
, size_t n
) { return _memccpy(s1
, s2
, c
, n
); }
41 #endif /* _CRT_MEMORY_DEFINED */
43 int __cdecl
_strcmpi(const char*,const char*);
44 char* __cdecl
_strdup(const char*);
45 char* __cdecl
_strerror(const char*);
46 int __cdecl
_stricmp(const char*,const char*);
47 int __cdecl
_stricoll(const char*,const char*);
48 char* __cdecl
_strlwr(char*);
49 int __cdecl
_strnicmp(const char*,const char*,size_t);
50 char* __cdecl
_strnset(char*,int,size_t);
51 char* __cdecl
_strrev(char*);
52 char* __cdecl
_strset(char*,int);
53 char* __cdecl
_strupr(char*);
55 void* __cdecl
memmove(void*,const void*,size_t);
56 char* __cdecl
strcat(char*,const char*);
57 char* __cdecl
strchr(const char*,int);
58 int __cdecl
strcmp(const char*,const char*);
59 int __cdecl
strcoll(const char*,const char*);
60 char* __cdecl
strcpy(char*,const char*);
61 size_t __cdecl
strcspn(const char*,const char*);
62 char* __cdecl
strerror(int);
63 size_t __cdecl
strlen(const char*);
64 char* __cdecl
strncat(char*,const char*,size_t);
65 int __cdecl
strncmp(const char*,const char*,size_t);
66 char* __cdecl
strncpy(char*,const char*,size_t);
67 char* __cdecl
strpbrk(const char*,const char*);
68 char* __cdecl
strrchr(const char*,int);
69 size_t __cdecl
strspn(const char*,const char*);
70 char* __cdecl
strstr(const char*,const char*);
71 char* __cdecl
strtok(char*,const char*);
72 size_t __cdecl
strxfrm(char*,const char*,size_t);
74 #ifndef _WSTRING_DEFINED
75 #define _WSTRING_DEFINED
76 wchar_t* __cdecl
_wcsdup(const wchar_t*);
77 int __cdecl
_wcsicmp(const wchar_t*,const wchar_t*);
78 int __cdecl
_wcsicoll(const wchar_t*,const wchar_t*);
79 wchar_t* __cdecl
_wcslwr(wchar_t*);
80 int __cdecl
_wcsnicmp(const wchar_t*,const wchar_t*,size_t);
81 wchar_t* __cdecl
_wcsnset(wchar_t*,wchar_t,size_t);
82 wchar_t* __cdecl
_wcsrev(wchar_t*);
83 wchar_t* __cdecl
_wcsset(wchar_t*,wchar_t);
84 wchar_t* __cdecl
_wcsupr(wchar_t*);
86 wchar_t* __cdecl
wcscat(wchar_t*,const wchar_t*);
87 wchar_t* __cdecl
wcschr(const wchar_t*,wchar_t);
88 int __cdecl
wcscmp(const wchar_t*,const wchar_t*);
89 int __cdecl
wcscoll(const wchar_t*,const wchar_t*);
90 wchar_t* __cdecl
wcscpy(wchar_t*,const wchar_t*);
91 size_t __cdecl
wcscspn(const wchar_t*,const wchar_t*);
92 size_t __cdecl
wcslen(const wchar_t*);
93 wchar_t* __cdecl
wcsncat(wchar_t*,const wchar_t*,size_t);
94 int __cdecl
wcsncmp(const wchar_t*,const wchar_t*,size_t);
95 wchar_t* __cdecl
wcsncpy(wchar_t*,const wchar_t*,size_t);
96 wchar_t* __cdecl
wcspbrk(const wchar_t*,const wchar_t*);
97 wchar_t* __cdecl
wcsrchr(const wchar_t*,wchar_t wcFor
);
98 size_t __cdecl
wcsspn(const wchar_t*,const wchar_t*);
99 wchar_t* __cdecl
wcsstr(const wchar_t*,const wchar_t*);
100 wchar_t* __cdecl
wcstok(wchar_t*,const wchar_t*);
101 size_t __cdecl
wcsxfrm(wchar_t*,const wchar_t*,size_t);
102 #endif /* _WSTRING_DEFINED */
109 static inline int strcasecmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
110 static inline int strcmpi(const char* s1
, const char* s2
) { return _strcmpi(s1
, s2
); }
111 static inline char* strdup(const char* buf
) { return _strdup(buf
); }
112 static inline int stricmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
113 static inline int stricoll(const char* s1
, const char* s2
) { return _stricoll(s1
, s2
); }
114 static inline char* strlwr(char* str
) { return _strlwr(str
); }
115 static inline int strncasecmp(const char *str1
, const char *str2
, size_t n
) { return _strnicmp(str1
, str2
, n
); }
116 static inline int strnicmp(const char* s1
, const char* s2
, size_t n
) { return _strnicmp(s1
, s2
, n
); }
117 static inline char* strnset(char* str
, int value
, unsigned int len
) { return _strnset(str
, value
, len
); }
118 static inline char* strrev(char* str
) { return _strrev(str
); }
119 static inline char* strset(char* str
, int value
) { return _strset(str
, value
); }
120 static inline char* strupr(char* str
) { return _strupr(str
); }
122 static inline wchar_t* wcsdup(const wchar_t* str
) { return _wcsdup(str
); }
123 static inline int wcsicoll(const wchar_t* str1
, const wchar_t* str2
) { return _wcsicoll(str1
, str2
); }
124 static inline wchar_t* wcslwr(wchar_t* str
) { return _wcslwr(str
); }
125 static inline int wcsnicmp(const wchar_t* str1
, const wchar_t* str2
, size_t n
) { return _wcsnicmp(str1
, str2
, n
); }
126 static inline wchar_t* wcsnset(wchar_t* str
, wchar_t c
, size_t n
) { return _wcsnset(str
, c
, n
); }
127 static inline wchar_t* wcsrev(wchar_t* str
) { return _wcsrev(str
); }
128 static inline wchar_t* wcsset(wchar_t* str
, wchar_t c
) { return _wcsset(str
, c
); }
129 static inline wchar_t* wcsupr(wchar_t* str
) { return _wcsupr(str
); }
131 #endif /* __WINE_STRING_H */