linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* strtok - strings without delimiters
@ 2013-05-12 20:22 Georg Sauthoff
       [not found] ` <20130512202212.GL21458-w6h1d7rV6+VwFLYp8hBm2A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Georg Sauthoff @ 2013-05-12 20:22 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi,

the strtok man-page does not specify what happens if `str` does not
contain any `delim`iters.

If you don't already know strtok one might assume then either:

- the delimiter-less string is considered the next token and thus
  returned upon the first call to strtok
- on the first call NULL is returned because there are not any tokens

Related issue: is the non-empty `str`-suffix after the last `delim`
returned as a token or not?

I know how strtok works - but perhaps it makes sense to explicitly
address these issues in the Linux man page.

Best regards
Georg
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-02 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-12 20:22 strtok - strings without delimiters Georg Sauthoff
     [not found] ` <20130512202212.GL21458-w6h1d7rV6+VwFLYp8hBm2A@public.gmane.org>
2013-05-19 20:46   ` Michael Kerrisk
     [not found]     ` <51993A39.3060606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-06-01 20:58       ` Georg Sauthoff
     [not found]         ` <20130601205854.GP21458-w6h1d7rV6+VwFLYp8hBm2A@public.gmane.org>
2013-06-02 12:28           ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).