Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : mbsinit

intmbsinit(const mbstate_t * ps) ;

Return Type : int

Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
Read about return values of mbsinit function .

1st Parameter Type : const mbstate_t *

A pointer to a constant `mbstate_t` object representing the current shift state for multibyte to wide character conversions. The pointed-to state cannot be modified through this pointer.

1st Parameter

Pointer to an `mbstate_t` object representing the current conversion state. If `ps` is `NULL`, the function considers the state as initialized.

Read more about parameters of mbsinit in parameters section
The mbsinitfunction in C language Checks if the multibyte state object is in the initial state.
The mbsinit function determines whether the pointed-to mbstate_t object describes an initial conversion state. It returns non-zero if ps is a null pointer or if the pointed-to object describes an initial conversion state; otherwise, it returns zero.
The mbsinitfunction takes 1 parameter:
  • const mbstate_t * `ps`: Pointer to an `mbstate_t` object representing the current conversion state. If `ps` is `NULL`, the function considers the state as initialized.
Checks if the given conversion state object `ps` is in its initial state, indicating that no partial multibyte character is being processed. Returns a nonzero value if the state is initial or `ps` is `NULL`, and `0` otherwise.
The mbsinit function return value :
  • Returns non-zero if ps is NULL or if *ps describes an initial conversion state; otherwise, returns zero

Output

This example demonstrates basic usage of mbsinit to check the state before and after a multibyte conversion.