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 errno_t __cdecl
memcpy_s(void*,size_t,const void*,size_t);
36 void* __cdecl
memset(void*,int,size_t);
37 void* __cdecl
_memccpy(void*,const void*,int,unsigned int);
38 int __cdecl
_memicmp(const void*,const void*,unsigned int);
40 static inline int memicmp(const void* s1
, const void* s2
, size_t len
) { return _memicmp(s1
, s2
, len
); }
41 static inline void* memccpy(void *s1
, const void *s2
, int c
, size_t n
) { return _memccpy(s1
, s2
, c
, n
); }
42 #endif /* _CRT_MEMORY_DEFINED */
44 int __cdecl
_strcmpi(const char*,const char*);
45 int __cdecl
_strcoll_l(const char*, const char*, _locale_t
);
46 char* __cdecl
_strdup(const char*);
47 char* __cdecl
_strerror(const char*);
48 errno_t __cdecl
strerror_s(char*,size_t,int);
49 int __cdecl
_stricmp(const char*,const char*);
50 int __cdecl
_stricoll(const char*,const char*);
51 int __cdecl
_stricoll_l(const char*, const char*, _locale_t
);
52 char* __cdecl
_strlwr(char*);
53 errno_t __cdecl
_strlwr_s(char*,size_t);
54 int __cdecl
_strncoll(const char*, const char*, size_t);
55 int __cdecl
_strncoll_l(const char*, const char*, size_t, _locale_t
);
56 int __cdecl
_strnicmp(const char*,const char*,size_t);
57 int __cdecl
_strnicoll(const char*, const char*, size_t);
58 int __cdecl
_strnicoll_l(const char*, const char*, size_t, _locale_t
);
59 char* __cdecl
_strnset(char*,int,size_t);
60 char* __cdecl
_strrev(char*);
61 char* __cdecl
_strset(char*,int);
62 char* __cdecl
_strupr(char*);
63 errno_t __cdecl
_strupr_s(char *, size_t);
65 void* __cdecl
memmove(void*,const void*,size_t);
66 errno_t __cdecl
memmove_s(void*,size_t,const void*,size_t);
67 char* __cdecl
strcat(char*,const char*);
68 errno_t __cdecl
strcat_s(char*,size_t,const char*);
69 char* __cdecl
strchr(const char*,int);
70 int __cdecl
strcmp(const char*,const char*);
71 int __cdecl
strcoll(const char*,const char*);
72 char* __cdecl
strcpy(char*,const char*);
73 errno_t __cdecl
strcpy_s(char*,size_t,const char*);
74 size_t __cdecl
strcspn(const char*,const char*);
75 char* __cdecl
strerror(int);
76 size_t __cdecl
strlen(const char*);
77 char* __cdecl
strncat(char*,const char*,size_t);
78 errno_t __cdecl
strncat_s(char*,size_t,const char*,size_t);
79 int __cdecl
strncmp(const char*,const char*,size_t);
80 char* __cdecl
strncpy(char*,const char*,size_t);
81 errno_t __cdecl
strncpy_s(char*,size_t,const char*,size_t);
82 size_t __cdecl
strnlen(const char*,size_t);
83 char* __cdecl
strpbrk(const char*,const char*);
84 char* __cdecl
strrchr(const char*,int);
85 size_t __cdecl
strspn(const char*,const char*);
86 char* __cdecl
strstr(const char*,const char*);
87 char* __cdecl
strtok(char*,const char*);
88 char* __cdecl
strtok_s(char*,const char*,char**);
89 size_t __cdecl
strxfrm(char*,const char*,size_t);
91 #ifndef _WSTRING_DEFINED
92 #define _WSTRING_DEFINED
93 wchar_t* __cdecl
_wcsdup(const wchar_t*);
94 int __cdecl
_wcsicmp(const wchar_t*,const wchar_t*);
95 int __cdecl
_wcsicoll(const wchar_t*,const wchar_t*);
96 int __cdecl
_wcsicoll_l(const wchar_t*, const wchar_t*, _locale_t
);
97 wchar_t* __cdecl
_wcslwr(wchar_t*);
98 errno_t __cdecl
_wcslwr_s(wchar_t*, size_t);
99 int __cdecl
_wcscoll_l(const wchar_t*, const wchar_t*, _locale_t
);
100 int __cdecl
_wcsncoll(const wchar_t*, const wchar_t*, size_t);
101 int __cdecl
_wcsncoll_l(const wchar_t*, const wchar_t*, size_t, _locale_t
);
102 int __cdecl
_wcsnicmp(const wchar_t*,const wchar_t*,size_t);
103 int __cdecl
_wcsnicoll(const wchar_t*,const wchar_t*,size_t);
104 int __cdecl
_wcsnicoll_l(const wchar_t*, const wchar_t*, size_t, _locale_t
);
105 size_t __cdecl
_wcsnlen(const wchar_t*,size_t);
106 wchar_t* __cdecl
_wcsnset(wchar_t*,wchar_t,size_t);
107 wchar_t* __cdecl
_wcsrev(wchar_t*);
108 wchar_t* __cdecl
_wcsset(wchar_t*,wchar_t);
109 wchar_t* __cdecl
_wcsupr(wchar_t*);
110 errno_t __cdecl
_wcsupr_s(wchar_t*, size_t);
112 wchar_t* __cdecl
wcscat(wchar_t*,const wchar_t*);
113 errno_t __cdecl
wcscat_s(wchar_t*,size_t,const wchar_t*);
114 wchar_t* __cdecl
wcschr(const wchar_t*,wchar_t);
115 int __cdecl
wcscmp(const wchar_t*,const wchar_t*);
116 int __cdecl
wcscoll(const wchar_t*,const wchar_t*);
117 wchar_t* __cdecl
wcscpy(wchar_t*,const wchar_t*);
118 errno_t __cdecl
wcscpy_s(wchar_t*,size_t,const wchar_t*);
119 size_t __cdecl
wcscspn(const wchar_t*,const wchar_t*);
120 size_t __cdecl
wcslen(const wchar_t*);
121 wchar_t* __cdecl
wcsncat(wchar_t*,const wchar_t*,size_t);
122 int __cdecl
wcsncmp(const wchar_t*,const wchar_t*,size_t);
123 wchar_t* __cdecl
wcsncpy(wchar_t*,const wchar_t*,size_t);
124 errno_t __cdecl
wcsncpy_s(wchar_t*,size_t,const wchar_t*,size_t);
125 size_t __cdecl
wcsnlen(const wchar_t*,size_t);
126 wchar_t* __cdecl
wcspbrk(const wchar_t*,const wchar_t*);
127 wchar_t* __cdecl
wcsrchr(const wchar_t*,wchar_t wcFor
);
128 size_t __cdecl
wcsspn(const wchar_t*,const wchar_t*);
129 wchar_t* __cdecl
wcsstr(const wchar_t*,const wchar_t*);
130 wchar_t* __cdecl
wcstok(wchar_t*,const wchar_t*);
131 size_t __cdecl
wcsxfrm(wchar_t*,const wchar_t*,size_t);
132 #endif /* _WSTRING_DEFINED */
139 static inline int strcasecmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
140 static inline int strcmpi(const char* s1
, const char* s2
) { return _strcmpi(s1
, s2
); }
141 static inline char* strdup(const char* buf
) { return _strdup(buf
); }
142 static inline int stricmp(const char* s1
, const char* s2
) { return _stricmp(s1
, s2
); }
143 static inline int stricoll(const char* s1
, const char* s2
) { return _stricoll(s1
, s2
); }
144 static inline char* strlwr(char* str
) { return _strlwr(str
); }
145 static inline int strncasecmp(const char *str1
, const char *str2
, size_t n
) { return _strnicmp(str1
, str2
, n
); }
146 static inline int strnicmp(const char* s1
, const char* s2
, size_t n
) { return _strnicmp(s1
, s2
, n
); }
147 static inline char* strnset(char* str
, int value
, unsigned int len
) { return _strnset(str
, value
, len
); }
148 static inline char* strrev(char* str
) { return _strrev(str
); }
149 static inline char* strset(char* str
, int value
) { return _strset(str
, value
); }
150 static inline char* strupr(char* str
) { return _strupr(str
); }
152 static inline wchar_t* wcsdup(const wchar_t* str
) { return _wcsdup(str
); }
153 static inline int wcsicoll(const wchar_t* str1
, const wchar_t* str2
) { return _wcsicoll(str1
, str2
); }
154 static inline wchar_t* wcslwr(wchar_t* str
) { return _wcslwr(str
); }
155 static inline int wcsicmp(const wchar_t* s1
, const wchar_t* s2
) { return _wcsicmp(s1
, s2
); }
156 static inline int wcsnicmp(const wchar_t* str1
, const wchar_t* str2
, size_t n
) { return _wcsnicmp(str1
, str2
, n
); }
157 static inline wchar_t* wcsnset(wchar_t* str
, wchar_t c
, size_t n
) { return _wcsnset(str
, c
, n
); }
158 static inline wchar_t* wcsrev(wchar_t* str
) { return _wcsrev(str
); }
159 static inline wchar_t* wcsset(wchar_t* str
, wchar_t c
) { return _wcsset(str
, c
); }
160 static inline wchar_t* wcsupr(wchar_t* str
) { return _wcsupr(str
); }
162 #endif /* __WINE_STRING_H */