3 ms·
man -a strtok with all manual pages installed[1] (POSIX, Linux, BSD), you get a pretty good idea as to how to use it properly, or reading the SEI C Coding Stan
by johnisgood 2y ago
man -a strtok
with all manual pages installed[1] (POSIX, Linux, BSD), you get a pretty good idea as to how to use it properly, or reading the SEI C Coding Standard helps. OpenBSD deprecated it in favor of strsep. It is not painful to use if you know (read all the manual pages at the very least).
Been happily using it for a long time (unless other functions are not more ideal for the specific use-case).
There are some things to pay attention to, but the manual pages pretty much tell you everything you need to know.
[1] https://archlinux.org/packages/core/any/man-pages/ https://archlinux.org/packages/core/any/man-pages/ on Arch Linux, perhaps it is "man-pages" for other distros, too. As per Arch wiki: "man-pages provides both the Linux and the POSIX.1 man pages".
You may also do:
curl -sL 'https://man.archlinux.org/man/strtok.raw' | man -l -
or
curl -sL 'https://man.archlinux.org/man/getaddrinfo_a.raw' | man -l -
for "strtok", although not sure it provides ALL manual pages.