[Previous] [Contents] [Index] [Next]

wmemchr()

Locate the first occurrence of a wide character in a buffer

Synopsis:

#include <wchar.h>

wchar_t * wmemchr( const wchar_t * ws,
                   wchar_t wc,
                   size_t n );

Library:

libc

Description:

The wmemchr() function locates the first occurrence of wc (converted to a wchar_t) in the first n bytes of the buffer pointed to by ws.

The wmemchr() function is locale-independent and treats all wchar_t values identically, even if they're null or invalid characters.

Returns:

NULL
Failure; wc couldn't be found.
x
Success; a pointer to the located character.

Classification:

ANSI

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

"Memory manipulation functions" and "Wide-character functions" in the summary of functions chapter.


[Previous] [Contents] [Index] [Next]