#include <wchar.h>
|
|
wchar_t *
wcstok (wchar_t * restrict str, const wchar_t * restrict sep, wchar_t ** restrict last); |
The wcstok function is the wide character counterpart of the strtok_r function.
#include <wchar.h>
/* Illustrates how to use wcstok API */
int example_wcstok()
{
/* source wide character string */
const wchar_t *seps = L"onetwhr";
wchar_t *last, *tok, text[] = L"onetwothree";
tok = wcstok(text, seps, &last);
if(tok == NULL)
return 0;
else
return 1;
}
const wchar_t *seps = L" \t\n";
wchar_t *last, *tok, text[] = L" \none\ttwo\t\tthree \n";
for (tok = wcstok(text, seps, &last); tok != NULL;
tok = wcstok(NULL, seps, &last))
wprintf(L"%ls\n", tok);
The wcstok function conforms to -isoC-99.
|
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|