From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/string%2Fwide%2Fwcslen.html | 38 ----------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 devdocs/c/string%2Fwide%2Fwcslen.html (limited to 'devdocs/c/string%2Fwide%2Fwcslen.html') diff --git a/devdocs/c/string%2Fwide%2Fwcslen.html b/devdocs/c/string%2Fwide%2Fwcslen.html deleted file mode 100644 index efb4dde8..00000000 --- a/devdocs/c/string%2Fwide%2Fwcslen.html +++ /dev/null @@ -1,38 +0,0 @@ -

wcslen, wcsnlen_s

Defined in header <wchar.h>
size_t wcslen( const wchar_t *str );
-
(1) (since C95)
size_t wcsnlen_s(const wchar_t *str, size_t strsz);
-
(2) (since C11)
-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 str is a null pointer and returns strsz if the null wide character was not found in the first strsz wide characters of src As with all bounds-checked functions, wcslen_s 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 <stdio.h>..

Parameters

- - -
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 str.
-2) The length of the null-terminated wide string str on success, zero if str is a null pointer, strsz if the null wide character was not found.

Notes

strnlen_s and 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.

-

Example

#include <wchar.h>
-#include <stdio.h>
- 
-int main(void)
-{
-    wchar_t str[] = L"How many wide characters does this string contain?";
- 
-    printf("without null character: %zu\n", wcslen(str));
-    printf("with null character: %zu\n", sizeof str / sizeof *str);
-}

Output:

-
without null character: 50
-with null character: 51

References

See also

- -
-
(C11)
returns the length of a given string
(function)
C++ documentation for wcslen
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/string/wide/wcslen -

-
-- cgit v1.2.3