2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 ANSI C function strtok().
10 /*****************************************************************************
22 Separates a string by the characters in sep.
25 str - The string to check or NULL if the next word in
26 the last string is to be searched.
27 sep - Characters which separate "words" in str.
30 The first word in str or the next one if str is NULL.
33 The function changes str !
38 strcpy (buffer, "Hello, this is a test.");
40 // Init. Returns "Hello"
41 strtok (str, " \t,.");
43 // Next word. Returns "this"
44 strtok (NULL, " \t,.");
46 // Next word. Returns "is"
49 // Next word. Returns "a"
52 // Next word. Returns "test."
55 // Next word. Returns NULL.
64 ******************************************************************************/
73 str
+= strspn (str
, sep
);
80 t
+= strcspn (str
, sep
);