Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : towctrans

wint_ttowctrans(wint_t wc,wctrans_t desc) ;

Return Type : wint_t

An integer type capable of storing any wide character value or the special value WEOF, used in wide-character input/output functions.
Read about return values of towctrans function .

1st Parameter Type : wint_t

An integer type capable of storing any wide character value or the special value WEOF, used in wide-character input/output functions.

1st Parameter

The wide character to be transformed. Must be a valid `wint_t` value or `WEOF`.

2nd Parameter Type : wctrans_t

A data type representing a character mapping descriptor used for wide-character transformations. It is typically obtained using the `wctrans` function to specify transformations like `tolower` or `toupper` for wide characters.

2nd Parameter

A character mapping descriptor specifying the transformation to apply (e.g., `tolower` or `toupper`). Must be obtained using the `wctrans` function.

Read more about parameters of towctrans in parameters section
The towctransfunction in C language Applies a specified transformation to a wide character, such as tolower or toupper.
The towctrans function applies a specified locale-specific character mapping to a wide character. It's a generalized character conversion function that can perform various transformations depending on the wctrans_t descriptor provided. Common uses include converting between uppercase and lowercase.
The towctransfunction takes 2 parameters:
  • wint_t `wc`: The wide character to be transformed. Must be a valid `wint_t` value or `WEOF`.
  • wctrans_t `desc`: A character mapping descriptor specifying the transformation to apply (e.g., `tolower` or `toupper`). Must be obtained using the `wctrans` function.
Transforms the wide character `wc` according to the mapping specified by `desc`, which is typically obtained from the `wctrans` function. If `wc` is `WEOF`, the function returns `WEOF`. Otherwise, it applies the specified transformation and returns the result.
The towctrans function return value :
  • Returns the transformed wide character if a mapping is defined, otherwise returns the input character unchanged

Output

This example uses towctrans to convert an uppercase wide character to lowercase.