String::TruncateString::Truncate is a Perl module for when strings are too long to be displayed in. | |
Download |
String::Truncate Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ricardo Signes
- Publisher web site:
- http://search.cpan.org/~rjbs/
String::Truncate Tags
String::Truncate Description
String::Truncate is a Perl module for when strings are too long to be displayed in. String::Truncate is a Perl module for when strings are too long to be displayed in.SYNOPSISThis module handles the simple but common problem of long strings and finite terminal width. It can convert: "this is your brain" -> "this is your ..." or "...is your brain" or "this is... brain" or "... is your b..."It's simple: use String::Truncate qw(elide); my $brain = "this is your brain"; elide($brain, 16); # first option elide($brain, 16, { truncate => 'left' }); # second option elide($brain, 16, { truncate => 'middle' }); # third option elide($brain, 16, { truncate => 'ends' }); # fourth option String::Trunc::trunc($brain, 16); # => "this is your bra" Requirements: · Perl
String::Truncate Related Software