Text::Overflow -
use Text::Overflow qw(ellipsis clip); clip('1234567890', 6); #=> '123456'; clip('1234567890', 6); #=> '123'; ellipsis('1234567890', 6); #=> '12345…'; ellipsis('1234567890', 6); #=> '12…';
Text::Overflow is for clipping text for a width
Return visual width of $string.
$string
Trim $string to visual width specified $length including $delim
$length
$delim
Clip $string. This is same as vtrim($string, $length, "")
Clip and append ellipsis character. This is same as vtrim($string, $length, "…")
cho45 <cho45@lowreal.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::Overflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Overflow
CPAN shell
perl -MCPAN -e shell install Text::Overflow
For more information on module installation, please visit the detailed CPAN module installation guide.