ntdll: Implement wcsnlen().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-01-29 20:39:55 -06:00 committed by Alexandre Julliard
parent ad5b6be1a9
commit a524ab5004
2 changed files with 12 additions and 0 deletions

View File

@ -1609,6 +1609,7 @@
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcsnlen(ptr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr)

View File

@ -251,6 +251,17 @@ LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
}
/*********************************************************************
* wcsnlen (NTDLL.@)
*/
size_t __cdecl wcsnlen( const WCHAR *str, size_t len )
{
const WCHAR *s = str;
for (s = str; len && *s; s++, len--) ;
return s - str;
}
/*********************************************************************
* wcspbrk (NTDLL.@)
*/