On Sat, 23 May 2026 at 10:21, Branko Čibej <[email protected]> wrote:

>
>
>
[..]



> I'd also suggest these two functions be renamed to ..._trim_left() and
> ..._trim_right(), because that's what they actually do. I'd let the caller
> deal with padding, either via *printf() or in any other way they like, and
> have the trim functions return the (byte) length of the transformed strings
> as well as their visual width.
>
>
Another option that comes to mind would be to add TRUNCATE argument and
keep align_left()/align_right() function names. In this case it will be
clear if function truncates existing string and also can be used in
situation when truncating is not needed.

-- 
Ivan Zhakov

Reply via email to