Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/wcstring.c | 11 +++++++++++ 2 files changed, 12 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 7fc46231ae9..5824cd147e1 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1609,6 +1609,7 @@ @ cdecl wcsncat(wstr wstr long) @ cdecl wcsncmp(wstr wstr long) @ cdecl wcsncpy(ptr wstr long) +@ cdecl wcsnlen(wstr long) @ cdecl wcspbrk(wstr wstr) @ cdecl wcsrchr(wstr long) @ cdecl wcsspn(wstr wstr) diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index a727e4defac..9422e4f676c 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -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.@) */