string.3, strlen.3, strnlen.3: Use 'bytes' not 'characters'

This is inline with POSIX terminology. See also the earlier
commit a00b7454b8 (in 2012)
which fixed most of these cases.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-08-04 11:30:53 +02:00
parent bf8fc2759b
commit 51d8bd5745
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ ignoring case.
.BI "int strncasecmp(const char *" s1 ", const char *" s2 ", size_t " n ); .BI "int strncasecmp(const char *" s1 ", const char *" s2 ", size_t " n );
Compare the first Compare the first
.I n .I n
characters of the strings bytes of the strings
.I s1 .I s1
and and
.I s2 .I s2
@ -132,7 +132,7 @@ Return the length of the string
.BI "char *strncat(char *" dest ", const char *" src ", size_t " n ); .BI "char *strncat(char *" dest ", const char *" src ", size_t " n );
Append at most Append at most
.I n .I n
characters from the string bytes from the string
.I src .I src
to the string to the string
.IR dest , .IR dest ,
@ -199,7 +199,7 @@ Transforms
.I src .I src
to the current locale and copies the first to the current locale and copies the first
.I n .I n
characters to bytes to
.IR dest . .IR dest .
.SH DESCRIPTION .SH DESCRIPTION
The string functions perform operations on null-terminated The string functions perform operations on null-terminated

View File

@ -45,7 +45,7 @@ excluding the terminating null byte (\(aq\\0\(aq).
.SH RETURN VALUE .SH RETURN VALUE
The The
.BR strlen () .BR strlen ()
function returns the number of characters in the string pointed to by function returns the number of bytes in the string pointed to by
.IR s . .IR s .
.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

View File

@ -41,7 +41,7 @@ _GNU_SOURCE
.SH DESCRIPTION .SH DESCRIPTION
The The
.BR strnlen () .BR strnlen ()
function returns the number of characters in the string function returns the number of bytes in the string
pointed to by pointed to by
.IR s , .IR s ,
excluding the terminating null byte (\(aq\\0\(aq), excluding the terminating null byte (\(aq\\0\(aq),