Commit 4b0809e8 authored by Alexandre Julliard's avatar Alexandre Julliard

Use the unicode.h functions where possible.

parent 27867e25
...@@ -132,15 +132,7 @@ LPWSTR __cdecl NTDLL_wcscpy( LPWSTR dst, LPCWSTR src ) ...@@ -132,15 +132,7 @@ LPWSTR __cdecl NTDLL_wcscpy( LPWSTR dst, LPCWSTR src )
*/ */
INT __cdecl NTDLL_wcscspn( LPCWSTR str, LPCWSTR reject ) INT __cdecl NTDLL_wcscspn( LPCWSTR str, LPCWSTR reject )
{ {
LPCWSTR start = str; return strcspnW( str, reject );
while (*str)
{
LPCWSTR p = reject;
while (*p && (*p != *str)) p++;
if (*p) break;
str++;
}
return str - start;
} }
...@@ -192,13 +184,7 @@ LPWSTR __cdecl NTDLL_wcsncpy( LPWSTR s1, LPCWSTR s2, INT n ) ...@@ -192,13 +184,7 @@ LPWSTR __cdecl NTDLL_wcsncpy( LPWSTR s1, LPCWSTR s2, INT n )
*/ */
LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept ) LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept )
{ {
LPCWSTR p; return strpbrkW( str, accept );
while (*str)
{
for (p = accept; *p; p++) if (*p == *str) return (LPWSTR)str;
str++;
}
return NULL;
} }
...@@ -207,13 +193,7 @@ LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept ) ...@@ -207,13 +193,7 @@ LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept )
*/ */
LPWSTR __cdecl NTDLL_wcsrchr( LPWSTR str, WCHAR ch ) LPWSTR __cdecl NTDLL_wcsrchr( LPWSTR str, WCHAR ch )
{ {
LPWSTR last = NULL; return strrchrW( str, ch );
while (*str)
{
if (*str == ch) last = str;
str++;
}
return last;
} }
...@@ -222,15 +202,7 @@ LPWSTR __cdecl NTDLL_wcsrchr( LPWSTR str, WCHAR ch ) ...@@ -222,15 +202,7 @@ LPWSTR __cdecl NTDLL_wcsrchr( LPWSTR str, WCHAR ch )
*/ */
INT __cdecl NTDLL_wcsspn( LPCWSTR str, LPCWSTR accept ) INT __cdecl NTDLL_wcsspn( LPCWSTR str, LPCWSTR accept )
{ {
LPCWSTR start = str; return strspnW( str, accept );
while (*str)
{
LPCWSTR p = accept;
while (*p && (*p != *str)) p++;
if (!*p) break;
str++;
}
return str - start;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment