| HTML-Widget documentation | Contained in the HTML-Widget distribution. |
HTML::Widget::Filter::TrimEdges - Trim whitespaces from beginning and end of string
my $f = $widget->filter( 'TrimEdges', 'foo' );
TrimEdges Filter.
Sebastian Riedel, sri@oook.de
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML-Widget documentation | Contained in the HTML-Widget distribution. |
package HTML::Widget::Filter::TrimEdges; use warnings; use strict; use base 'HTML::Widget::Filter';
sub filter { my ( $self, $value ) = @_; $value =~ s/^\s+//; $value =~ s/\s+$//; return $value; }
1;