DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

wcslen(S)


wcslen, wcsspn, wcscspn -- get wide character string length

Syntax

cc . . . -lc

#include <wchar.h>

size_t wcslen(const wchar_t *ws); size_t wcscspn(const wchar_t *ws1, const wchar_t *ws2); size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2);

Description

wcslen(S) counts the number of wide-character codes in the string pointed to by ws and returns the number count. The terminating null wide-character code is not included in the number count.

wcsspn(S) scans the wide character string pointed to by ws1, and finds the largest initial segment whose members are restricted to wide-character codes from the string pointed to by ws2. The number of wide characters in this segment is returned.

wcscspn(S) scans the wide character string pointed to by ws1, and finds the largest initial segment complementary to string ws2, i.e., none of the segment members is from the wide character string pointed to by ws2. The number of wide characters in this segment is returned.

Return values

Upon successful completion, these routines return the length computed; no error return value is reserved.

Diagnostics

The value of errno is undefined.

See also

iswctype(S), wctype(S)

Standards conformance

wcslen( ), wcsspn( ), and wcscspn( ) are conformant with:
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992. .
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003