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 );

Arguments:

ws
The buffer that you want to search.
wc
The character that you're looking for.
n
The number of wide characters to search in the buffer.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The wmemchr() function locates the first occurrence of wc in the first n wide characters 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:

A pointer to the located character, or NULL if wc couldn't be found.

Classification:

ANSI, POSIX 1003.1

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

Last modified: 2013-12-23

comments powered by Disqus