diff options
author | Fabrice Bauzac <fabrice.bauzac@wanadoo.fr> | 2012-02-17 23:34:01 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-02-17 23:34:01 +0000 |
commit | 0520adde6b06d750067cbdf46b1fb9d098b33a95 (patch) | |
tree | 2d796cabf05c25f66bffe820e243106e9b9c488b /manual/string.texi | |
parent | 3f4081cd59f0a69b74d5361de57a8225b26363e2 (diff) | |
download | glibc-0520adde6b06d750067cbdf46b1fb9d098b33a95.tar.gz |
Change recommendation of strchrnul in strchr documentation.
Diffstat (limited to 'manual/string.texi')
-rw-r--r-- | manual/string.texi | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/manual/string.texi b/manual/string.texi index f7d4ebea1d..abfb0798b9 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -1647,9 +1647,12 @@ strchr ("hello, world", '?') The terminating null character is considered to be part of the string, so you can use this function get a pointer to the end of a string by -specifying a null character as the value of the @var{c} argument. It -would be better (but less portable) to use @code{strchrnul} in this -case, though. +specifying a null character as the value of the @var{c} argument. + +When @code{strchr} returns a null pointer, it does not let you know +the position of the terminating null character it has found. If you +need that information, it is better (but less portable) to use +@code{strchrnul} than to search for it a second time. @end deftypefun @comment wchar.h |