mirror of https://github.com/mkerrisk/man-pages
strstr.3: Document special case for empty needle
Reported-by: Stefan Kanthak <stefan.kanthak@nexgo.de> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
f05d7043fe
commit
ec415ad970
|
@ -61,6 +61,14 @@ but ignores the case of both arguments.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
These functions return a pointer to the beginning of the
|
These functions return a pointer to the beginning of the
|
||||||
located substring, or NULL if the substring is not found.
|
located substring, or NULL if the substring is not found.
|
||||||
|
.PP
|
||||||
|
Note the special case:
|
||||||
|
If
|
||||||
|
.I needle
|
||||||
|
is the empty string,
|
||||||
|
the return value is always
|
||||||
|
.I haystack
|
||||||
|
itself.
|
||||||
.SH ATTRIBUTES
|
.SH ATTRIBUTES
|
||||||
For an explanation of the terms used in this section, see
|
For an explanation of the terms used in this section, see
|
||||||
.BR attributes (7).
|
.BR attributes (7).
|
||||||
|
|
Loading…
Reference in New Issue