develooper Front page | perl.perl5.porters | Postings from July 2021

Re: Pre-RFC: Width-aware (s)printf flag

Thread Previous | Thread Next
Neil Bowers
July 2, 2021 10:24
Re: Pre-RFC: Width-aware (s)printf flag
Message ID:
> I propose a new printf flag, perhaps `|`, to tell (s)printf to countthese strings by terminal width instead.

It would be very useful if this change also provided a `width` function, as a sister to `length`.

There are many CPAN modules that generate tables, columnar output, etc, which would benefit from such a function. It would be a pain to get this completely right, and keep it right with new emojis every year, but it would be a good Unicode feature to have in Perl’s toolbox.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About