[PATCH 2/4] string.3 fixes

Paul Eggert
2023-11-12T23:52:29Z

strncpy’s src need not be a string; it can be an array that
is not null-terminated. Reword so as to not imply that
the result always has some null padding. Use “byte” rather
than “character” to avoid issues with “character”, as
not every byte is a valid character in (for example) UTF-8 locales.
Replace “‐” (U+2020 HYPHEN) with “-” (U+002D HYPHEN-MINUS).
---
man3/string.3 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man3/string.3 b/man3/string.3
index bd8b342a6..4037fce47 100644
--- a/man3/string.3
+++ b/man3/string.3
@@ -185,8 +185,8 @@ bytes to
const char " src "[restrict ." n ],
.BI " size_t " n );
.fi
-Fill a fixed‐width buffer with characters from a string
-and pad with null bytes.
+Fill a fixed-size buffer with non-null bytes from a source array,
+padding with null bytes as needed.
.SH DESCRIPTION
The string functions perform operations on null-terminated
strings.
--
2.41.0