Next: wmemcmp, Up: Wchar strings [Contents][Index]
wmemchr
—find a wide character in memorySynopsis
#include <wchar.h> wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
Description
The wmemchr
function locates the first occurrence of c in the
initial n wide characters of the object pointed to be s. This
function is not affected by locale and all wchar_t values are treated
identically. The null wide character and wchar_t values not
corresponding to valid characters are not treated specially.
If n is zero, s must be a valid pointer and the function behaves as if no valid occurrence of c is found.
Returns
The wmemchr
function returns a pointer to the located
wide character, or a null pointer if the wide character does not occur
in the object.
Portability
wmemchr
is ISO/IEC 9899/AMD1:1995 (ISO C).
No supporting OS subroutines are required.