Template::Plugin::Filter::VisualTruncate - Filter Plugin for trimming text by the number of the columns of terminals and mobile phones.


Template-Plugin-Filter-VisualTruncate documentation  | view source Contained in the Template-Plugin-Filter-VisualTruncate distribution.

Index


NAME

Top

Template::Plugin::Filter::VisualTruncate - Filter Plugin for trimming text by the number of the columns of terminals and mobile phones.

SYNOPSIS

Top

Supported encodings on this module are UTF8, EUC-JP and system locale.

If your template was written in UTF8, then

    [% USE Filter.VisualTruncate 'utf8' %]
    [% row.comment | visual_truncate(20, '...') | html %]

or EUC-JP

    [% USE Filter.VisualTruncate 'euc-jp' %]
    [% row.comment | visual_truncate(20, '...') | html %]

or system locale

    [% USE Filter.VisualTruncate 'locale' %]
    [% row.comment | visual_truncate(20, '...') | html %]

If parameters are not specified explicitly...

    [% row.comment | visual_truncate() | html %]

default values is used.

    [% row.comment | visual_truncate(32, '...') | html %]

FUNCTIONS

Top

init

    Overrided method. See more detail Template::Plugin::Filter

filter

    Overrided method. See more detail Template::Plugin::Filter

SEE ALSO

Top

HTML::Filters, HTML::Plugin::Filter, Text::VisualWidth, Text::CharWidth

AUTHOR

Top

bokutin, <bokutin at cpan.org>

COPYRIGHT & LICENSE

Top


Template-Plugin-Filter-VisualTruncate documentation  | view source Contained in the Template-Plugin-Filter-VisualTruncate distribution.