bug-gnulib
[Top][All Lists]
Advanced

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

Re: RFC: add a string-desc module


From: Paul Eggert
Subject: Re: RFC: add a string-desc module
Date: Sat, 25 Mar 2023 08:51:34 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 2023-03-25 04:49, Bruno Haible wrote:

I'll add a comment regarding printf with the "%.*s" directive.

That works only if the string lacks NULs and its length fits into int, and one must also convert the idx_t length to int (e.g., via a cast which I find tricky). Although these limitations could be documented, it might also be good to have an API like quotearg to generate a quoted or quotable string that can be printed with plain %s.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]