DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

wcschr(S-osr5)


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-osr5) scans the wide character string pointed by ws until the wide character wc is found.

wcsrchr(S-osr5) 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-osr5) scans the wide character string pointed by ws1 until any wide-character code from the string ws2 is found.

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

Standards conformance

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