Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

wcsspn - get length of wide character substring

&pagelevel(4)&pagelevel

Syntax

#include <wchar.h>

size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2);

Description

Starting at the beginning of the wide character string ws1, wcsspn() computes the length of the segment that contains only characters from the wide character string ws2.

The function is terminated, and the segment length is returned on encountering the first character in ws1 that does not match any character in ws2.

If the first character in ws1 matches none of the characters in ws2, the segment length is equal to 0.

Return val.

Integer value

that indicates the segment length (number of matching characters), starting at the beginning of string ws1.

Notes

Wide character strings terminated with a null wide character code (\0) are expected as arguments.

Restriction
This version of the C runtime system only supports 1-byte characters as wide character codes. They are of type wchar_t (see stddef.h). (End)

See also

wcscspn(), wchar.h.