Defined in header
size_t wcslen( const wchar_t *str );
1) Returns the length of a wide string, that is the number of non-null wide characters that precede the terminating null wide character.
2) Same as (1), except that the function returns zero if
stris a null pointer and returns
strszif the null wide character was not found in the first
strszwide characters of
- As all bounds-checked functions,
wcsnlen_sis only guaranteed to be available if __STDC_LIB_EXT1__ is defined by the implementation and if the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before including
|str||-||pointer to the null-terminated wide string to be examined|
|strsz||-||maximum number of wide characters to examine|
 Return value
1) The length of the null-terminated wide string
2) The length of the null-terminated wide string
stron success, zero if
stris a null pointer,
strszif the null wide character was not found.
wcsnlen_s are the only bounds-checked functions that do not invoke the runtime constraints handler. They are pure utility functions used to provide limited support for non-null terminated strings.
without null character: 50 with null character: 51
 See also
| returns the length of a given string |
C++ documentation for wcslen