DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

wcslen(S-osr5)


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-osr5) 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-osr5) 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-osr5) 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-osr5), wctype(S-osr5)

Standards conformance

wcslen( ), wcsspn( ), and wcscspn( ) are conformant with:
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992. .
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005