Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
wcscspn(3) OSS Library Calls Reference Manual
NAME
wcscspn - Returns the length of the initial segment of a string
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <wchar.h>
size_t wcscspn(
const wchar_t *wcstring1,
const wchar_t *wcstring2);
PARAMETERS
wcstring1 Points to a wide-character string that is being checked for an initial segment.
wcstring2 Points to a wide-character string that contains a set of characters that define the
initial segment.
DESCRIPTION
The wcsspn( ) and wcscspn( ) functions compute the number of wchar_t characters in the initial
segment of the string.
The wcscspn( ) function considers the initial segment to consist of all characters that are not
included in the set of characters pointed to by the wcstring2 parameter. It counts these characters
until it finds one that is included in the set.
RETURN VALUES
Upon successful completion, the wcscspn( ) function returns the number of wchar_t characters
in the segment. Otherwise, it returns a value of -1 cast to size_t.
RELATED INFORMATION
Functions: setlocale(3), strspn(3), wcsspn(3).
8−10 Hewlett-Packard Company 527187-017