This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/kanji/jstrtok.c

20 lines
394 B
C
Raw Permalink Normal View History

#include <stdio.h>
#include <string.h>
#include <jstring.h>
void main()
{
JSTRING p;
JSTRING buffer;
JSTRING delims = { " .," };
buffer = strdup( "Find words, all of them." );
printf( "%s\n", buffer );
p = jstrtok( buffer, delims );
while( p != NULL ) {
printf( "word: %s\n", p );
p = jstrtok( NULL, delims );
}
printf( "%s\n", buffer );
}