Is the strtok function in standard C89?
Asked
Active
Viewed 648 times
3
-
6You could ask such a question here for every single function used in any C program, or you could look it up. – Jim Balter Mar 05 '11 at 08:33
-
1Where can you check if a function belongs to a given standard in an easy way? – M.E. Jan 28 '21 at 13:23
2 Answers
15
the man page says:
CONFORMING TO
strtok()
SVr4, POSIX.1-2001, 4.3BSD, C89, C99.
strtok_r()
POSIX.1-2001.
So I would say yes.
According to the C89 draft I have (the actual standard costs money), the appropriate section is:
4.11 STRING HANDLING <string.h>
4.11.5.8 The strtok function

Community
- 1
- 1

John Ledbetter
- 13,557
- 1
- 61
- 80
1
There are lists enumerating functions and other identifiers by standard and header. See e.g. http://www.schweikhardt.net/identifiers.html

Jens
- 69,818
- 15
- 125
- 179