wcschr(3): add special case for NUL, as in strchr(3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

in the section return value, strchr(3) and strrchr(3) explicitly
state the behaviour for NUL:

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

|  The terminating null byte is considered part of the string, so
|  that if c is specified as '\0', these functions return a pointer
|  to the terminator.

JFTR: to avoid any possible confusion of "null byte" alias NUL with
      the "null pointer" alias NULL (C macro) or nullptr (C++),
      "null byte" should be replaced with "NUL byte"!

The same explicit statement is but missing from both
<https://man7.org/linux/man-pages/man3/wcschr.3.html#RETURN_VALUE>
and
<https://man7.org/linux/man-pages/man3/wcsrchr.3.html#RETURN_VALUE>
and should be added there.

regards
Stefan



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux