Re: [PATCH] stpncpy.3, string_copying.7: Clarify that st[rp]ncpy() do NOT produce a string

Alejandro Colomar
2023-11-09T15:02:41Z

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

On Thu, Nov 09, 2023 at 02:47:05PM +0000, Jonny Grant wrote:
> >> It could clarify
> >> "Copy at most n bytes from string src to ARRAY dest, returning a
> >> pointer to the start of ARRAY dest."
> >
> > I think I prefer DJ's suggestion:
> >
> > "Fill a fixed‐width null‐padded buffer with bytes from a string."
>
> Better to make it clear it's null-padded after?
>
> "Fill a fixed‐width buffer with bytes from a string and pad with null bytes."

Yes, that looks even better. And I wasn't very happy with "bytes".
Maybe:

"Fill a fixed-width buffer with characters from a string and pad with
null bytes."

Thanks,
Alex

>
> I'll leave it with you.
>
> Kind regards
> Jonny

--
<https://www.alejandro-colomar.es/>