Implementation of strtok
Jayakrishna Vadayath
jvadayat@asu.edu
Fri Jun 2 05:52:56 GMT 2023
Hi,
The man page of strtok mention that strtok returns a pointer to the next
token or NULL if there are no more tokens :
https://man7.org/linux/man-pages/man3/strtok.3.html
I can see how the "no more tokens" would apply in this case, but it seems
like not many people are aware of this case.
Can you list the descriptions of strtok that explain this behavior ?
I am very interested in reading about it.
Thank you.
On Thu, Jun 1, 2023 at 10:40 PM Florian Weimer <fweimer@redhat.com> wrote:
> * Jayakrishna Vadayath via Libc-alpha:
>
> > According to the documentation of the strchr and strtok functions, it
> would
> > appear that (1) will never be executed.
>
> I looked at various descriptions of strtok, and they are pretty clear
> that the implemented behavior is required. Where did you find
> conflicting information?
>
> Thanks,
> Florian
>
>
--
Regards
Jayakrishna Menon
More information about the Libc-alpha
mailing list