Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : wcstok

wchar_t *wcstok(wchar_t * str,const wchar_t * delim,wchar_t ** saveptr) ;

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 wcstok function .

1st Parameter 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.

1st Parameter

Pointer to the wide-character string to be tokenized. On subsequent calls, this should be `NULL` to continue tokenization of the same string.

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 a null-terminated wide-character string containing the delimiters used to split `str`.

3rd Parameter Type : wchar_t **

Type wchar_t ** parameters

3rd Parameter

Pointer to a `wchar_t *` used to keep track of the current position in the string between calls.

Read more about parameters of wcstok in parameters section
The wcstokfunction in C language Tokenizes a wide character string using specified delimiters, storing the context.
wcstok breaks the wide string pointed to by s1 into a sequence of tokens, each of which is delimited by one or more characters from the wide string pointed to by s2. The first call to wcstok should have s1 as its first argument. Subsequent calls to break the same string should have NULL as their first argument. The separator string s2 may be different for each call. The parsing state is stored in the pointer pointed to by ptr between calls.
The wcstokfunction takes 3 parameters:
  • wchar_t * `str`: Pointer to the wide-character string to be tokenized. On subsequent calls, this should be `NULL` to continue tokenization of the same string.
  • const wchar_t * `delim`: Pointer to a null-terminated wide-character string containing the delimiters used to split `str`.
  • wchar_t ** `saveptr`: Pointer to a `wchar_t *` used to keep track of the current position in the string between calls.
Splits the wide-character string `str` into tokens using the characters in `delim` as delimiters. On the first call, `str` must point to the string to tokenize. On subsequent calls, pass `NULL` for `str` to continue tokenization. Returns a pointer to the next token or `NULL` if there are no more tokens.
The wcstok function return value :
  • Returns a pointer to the next token, or NULL if there are no more tokens

Output

This example demonstrates the basic usage of wcstok to tokenize a wide string using multiple delimiters.