master
 1#define __CRT__NO_INLINE
 2#include <string.h>
 3
 4size_t __cdecl
 5wcsnlen(const wchar_t *w, size_t ncnt)
 6{
 7  size_t n = 0;
 8
 9  for (; n < ncnt && *w != 0; n++, w++)
10    ;
11
12  return n;
13}