Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : wmemchr

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

Return Type : wchar_t *

A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
Read about return values of wmemchr function .

1st Parameter Type : const wchar_t *

A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.

1st Parameter

Pointer to the beginning of the wide-character array to be searched.

2nd Parameter Type : wchar_t

A data type used to represent wide characters, typically supporting larger character sets such as Unicode. Its size is platform-dependent but is often 2 or 4 bytes.

2nd Parameter

The wide character to search for in the array.

3rd Parameter Type : size_t

Platform-specific unsigned type for array indices and memory sizes.

3rd Parameter

The number of elements in the array to search.

Read more about parameters of wmemchr in parameters section
The wmemchrfunction in C language Searches for a wide character in the first 'n' wide characters of a wide character array.
wmemchr searches for the first occurrence of the wide character 'c' in the first 'n' wide characters of the object pointed to by 's'. This function operates on raw memory and doesn't stop at null terminators.
The wmemchrfunction takes 3 parameters:
  • const wchar_t * `ptr`: Pointer to the beginning of the wide-character array to be searched.
  • wchar_t `wc`: The wide character to search for in the array.
  • size_t `n`: The number of elements in the array to search.
Searches the first `n` elements of the wide-character array pointed to by `ptr` for the first occurrence of the wide character `wc`. Returns a pointer to the matching wide character, or `NULL` if the character is not found within the specified range.
The wmemchr function return value :
  • Returns a pointer to the located wide character, or NULL if the wide character does not occur in the object

Output

This example demonstrates the basic usage of wmemchr to find a character in a wide character string.