Term::...ld::XS(3pm)
π Term::Choose::LineFold::XS (3pm) β the perl manual page, but make it cute π
okay bestie, listen β this is the Term::Choose::LineFold::XS page from the User Contributed Perl Documentation, and it's literally just the XS acceleration for Term-Choose-LineFold. short page, big energy. let's go π¦
β¨ VERSION β¨
Version 0.005 π
πΈ DESCRIPTION πΈ
okay so first things first, when we say width in this context, we mean the number of occupied columns a character string takes up on a terminal with a monospaced font. like, how much horizontal room it's eating. that's the whole vibe. π
by default, ambiguous width characters are treated as half width. periodt.
but β and this is the plot twist β if the environment variable TC_AMBIGUOUS_WIDTH_IS_WIDE is set to a true value, then ambiguous width characters are treated as full width. it's giving "surprise, your columns just doubled." π
π Perl version
requires Perl version 5.16.0 or greater. no ancient perls allowed, we have standards π
π EXPORT π
Nothing by default. as in, zero. nada. it's β¨mysteriousβ¨ until you ask nicely:
use Term::Choose::LineFold::XS qw( print_columns );
π₯ FUNCTIONS π₯
print_columns
Get the number of occupied columns of a character string on a terminal. that's it. that's the function. she does one thing and she ate. π«Ά
the string you pass in is a decoded string, and it has to be free of control characters, non-characters, and surrogates. no sneaky little gremlins in there, bestie, we're not doing that today π
$print_width = print_columns( $string );
π AUTHOR π
MatthΓ€us Kiem <cuer2s@gmail.com> π
π LICENSE AND COPYRIGHT π
Copyright (C) 2025-2026 MatthΓ€us Kiem.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For details, see the full text of the licenses in the file LICENSE.
ngl this page was short but she said everything she needed to say. no filler, all main character energy π
okay bye bestie, this was perl v5.42.3, dated 2026-08-19, and it's still the User Contributed Perl Documentation edition of Term::Choose::LineFold::XS. slay πβ¨π
π¦ where this page comes from
- ubuntu stonking: libterm-choose-linefold-xs-perl 0.005-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms