(C) 1998 AROS - The Amiga Research OS


NAME
#include <string.h>

char * strtok ()

SYNOPSIS
char * str
const char * sep

FUNCTION
Separates a string by the characters in sep.

INPUTS
str
The string to check or NULL if the next word in the last string is to be searched.
sep
Characters which separate "words" in str.

RESULT
The first word in str or the next one if str is NULL.

EXAMPLE
char buffer[64];

strcpy (buffer, "Hello, this is a test.");

// Init. Returns "Hello"
strtok (str, " \t,.");

// Next word. Returns "this"
strtok (NULL, " \t,.");

// Next word. Returns "is"
strtok (NULL, " \t");

// Next word. Returns "a"
strtok (NULL, " \t");

// Next word. Returns "test."
strtok (NULL, " \t");

// Next word. Returns NULL.
strtok (NULL, " \t");
SEE ALSO

NOTES
The function changes str !

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
11.12.1996 aros
New functions