Text::VisualWidth::PP - trimming text by the number of the column s of terminals and mobile phones.
use utf8; use Text::VisualWidth::PP; Text::VisualWidth::PP::width("あいうえおaiu"); # => 13 Text::VisualWidth::PP::trim("あいうえおaiu", 7); # => "あいう"
This module provides functions to treat half-width and full-width characters and display correct size of text in one line on terminals and mobile phones. You can know the visual width of any text and truncate text by the visual width. Now this module support flagged UTF-8 and tested only with Japanese.
This module is pure perl version of Text::VisualWidth. This is bit slow, but it's not require compiler.
Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM>
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.