DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

wcschr(S)


wcschr, wcsrchr, wcspbrk, wcswcs -- wide character string scanning operation

Syntax

cc . . . -lc

#include <wchar.h>

wchar_t *wcschr(const wchar_t *ws, wint_t wc); wchar_t *wcsrchr(const wchar_t *ws, wint_t wc); wchar_t *wcspbrk(const wchar_t *ws1, const wchar_t *ws2); wchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2);

Description

wcschr(S) scans the wide character string pointed by ws until the wide character wc is found.

wcsrchr(S) scans the wide character string pointed by ws for the wide character wc and locates the last occurrence of wc in the string.

The character to be located, wc, must have a value that can be represented as a type wchar_t and its value must correspond to a valid wide-character code in the current locale. The null terminator is treated as part of the wide character string.

wcspbrk(S) scans the wide character string pointed by ws1 until any wide-character code from the string ws2 is found.

wcswcs(S) scans the wide character string pointed by ws1 until a substring identical to the wide character string pointed to by ws2 is found. The null terminator of ws2 is not used in the comparison.

Return values

Upon successful completion, wcschr( ), wcsrchr( ), and wcspbrk( ) return a pointer to the located wide-character code; wcswcs( ) returns a pointer to the located substring.

These routines return a null pointer if the search failed.

wcswcs( ) returns ws1 if ws2 points to a zero-length wide character string.

Diagnostics

The value of errno is undefined.

See also

iswctype(S), wctype(S)

Standards conformance

wcschr( ), wcsrchr( ), wcspbrk( ), and wcswcs( ) 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