Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : wmemcmp

intwmemcmp(const wchar_t * ptr1,const wchar_t * ptr2,size_t n) ;

Return Type : int

Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
Read about return values of wmemcmp 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 first wide-character array to compare.

2nd 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.

2nd Parameter

Pointer to the second wide-character array to compare.

3rd Parameter Type : size_t

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

3rd Parameter

The number of elements to compare in each array.

Read more about parameters of wmemcmp in parameters section
The wmemcmpfunction in C language Compares the first 'n' wide characters of two wide character arrays.
wmemcmp compares the first n wide characters of the object pointed to by s1 to the first n wide characters of the object pointed to by s2. This function operates on raw memory and doesn't stop at null terminators.
The wmemcmpfunction takes 3 parameters:
  • const wchar_t * `ptr1`: Pointer to the first wide-character array to compare.
  • const wchar_t * `ptr2`: Pointer to the second wide-character array to compare.
  • size_t `n`: The number of elements to compare in each array.
Compares the first `n` elements of the wide-character arrays `ptr1` and `ptr2`. Returns an integer less than, equal to, or greater than zero if the first array is found to be less than, equal to, or greater than the second array.
The wmemcmp function return value :
  • Returns an integer less than, equal to, or greater than zero if the first n wide characters of s1 are found, respectively, to be less than, to match, or be greater than the first n wide characters of s2

Output

This example demonstrates the basic usage of wmemcmp to compare two wide character strings up to a specified length.