• Re: strings (was Re: Variadic functions)

    From Lawrence D'Oliveiro@21:1/5 to Scott Lurndal on Fri Jan 26 04:49:03 2024
    On Fri, 26 Jan 2024 00:15:32 GMT, Scott Lurndal wrote:

    strcat should not be used. strncat isn't a suitable substitute.

    The BSDs tried to come up with some alternatives, e.g. strlcat(3).

    See also the code for stpecpy here <https://manpages.debian.org/7/string_copying.en.html>.

    snprintf does work quite well as a substitute for strcat.

    I’m assuming you’re not suggesting passing an arbitrary string (e.g. user- entered) for the format ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)