The (BSD) man pages for
strtok state in the first line under description
This interface is obsoleted by
Does that mean that
strtok should on the whole not be used? It does not provide any usage guidelines about
strtok's being obsolete beyond that. On
strsep's man page, it states under history
strsep()function is intended as a replacement for the
strtok()function. While the
strtok()function should be preferred for portability reasons (it conforms to ISO/IEC 9899:1990 (``ISO C90'')) it is unable to handle empty fields, i.e., detect fields delimited by two adjacent delimiter characters, or to be used for more than a single string at a time.
So, my questions are this
strsepon the whole be used over
- How much of a portability issue is there with
strsepas it appeared in BSD4.4 which was in June of 1994?
- Do all POSIX compliant machines have