2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
8 /*****************************************************************************
20 Separates a string by the characters in sep.
23 str - The string to check or NULL if the next word in
24 the last string is to be searched.
25 sep - Characters which separate "words" in str.
28 The first word in str or the next one if str is NULL.
31 The function changes str !
36 strcpy (buffer, "Hello, this is a test.");
38 // Init. Returns "Hello"
39 strtok (str, " \t,.");
41 // Next word. Returns "this"
42 strtok (NULL, " \t,.");
44 // Next word. Returns "is"
47 // Next word. Returns "a"
50 // Next word. Returns "test."
53 // Next word. Returns NULL.
62 ******************************************************************************/
71 str
+= strspn (str
, sep
);
78 t
+= strcspn (str
, sep
);