Thread (2 messages) 2 messages, 2 authors, 2021-07-25

strstr(3): add special case for empty needle, as in wcsstr(3)

flat view

From: Stefan Kanthak <hidden>
Date: 2021-07-12 09:33:08

Hi,

in the section return value, wcsstr(3) provides the following note
for the special case of an empty needle:

<https://man7.org/linux/man-pages/man3/wcsstr.3.html#RETURN_VALUE>

|  Note the special case: If needle is the empty wide-character
|  string, the return value is always haystack itself.

The same note is but missing in strstr(3) and should be added there:

<https://man7.org/linux/man-pages/man3/strstr.3.html#RETURN_VALUE>

|  Note the special case: If needle is the empty string, the return
|  value is always haystack itself.

regards
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help