NAME

HTML::Trim - HTML trimmer

SYNOPSIS

  use HTML::Trim;

  my $trimmed = HTML::Trim::vtrim('foo bar <a href="/">baz</a> fumino', 10, '…');
  #=> 'foo bar <a href="hoge">b</a>...'

DESCRIPTION

HTML::Trim is for trimming text by the number of character length or visual width (consider full-width characters).

HTML::Trim::trim($html, $length, $terminal)

Trim $html by character $length. When result is clipped, add $terminal to result HTML.

HTML::Trim::vtrim($html, $width, $terminal)

Trim $html by character $width (half-width = 1). When result is clipped, add $terminal to result HTML.

AUTHOR

cho45 <cho45@lowreal.net>

SEE ALSO

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.