wcsspn(3) — Subroutines
NAME
wcsspn, wcscspn − Returns the length of the initial segment of a wide-character string
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <wchar.h>
size_t wcsspn(
const wchar_t ∗wcstring1,
const wchar_t ∗wcstring2);
size_t wcscspn(
const wchar_t ∗wcstring1,
const wchar_t ∗wcstring2);
PARAMETERS
wcstring1Points to a wide-character string being checked for an initial segment.
wcstring2Points to a wide-character string containing a set of wide characters that define the initial segment.
DESCRIPTION
The wcsspn() and wcscspn() functions compute the number of wide characters in the initial segment of a wide-character string. The wcsspn() function considers the initial segment to consist of all wide characters that are included in the set of wide characters pointed to by the wcstring2 parameter. The function counts these wide characters until it finds one that is not included in the set. The wcscspn() function considers the initial segment to consist of all wide characters that are not included in the set of wide characters pointed to by the wcstring2 parameter. The function counts these wide characters until it finds one that is included in the set.
RETURN VALUES
On successful completion, the wcsspn() and wcscspn() functions return the number of wide characters in the segment.
RELATED INFORMATION
Functions: setlocale(3), strspn(3).