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

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

Thread Previous | Thread Next
From:
Neil Bowers
Date:
July 2, 2021 10:24
Subject:
Re: Pre-RFC: Width-aware (s)printf flag
Message ID:
353317a7-7e76-4830-af74-a6d85704e44c@Spark
> 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.

Neil

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About