Skip to content

Commit

Permalink
improved trim performance a little (closes #599)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 3, 2014
1 parent a0db1ba commit 2063544
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -311,7 +311,8 @@ sub tablify {

sub trim {
my $str = shift;
$str =~ s/^\s+|\s+$//g;
$str =~ s/^\s+//;
$str =~ s/\s+$//;
return $str;
}

Expand Down

0 comments on commit 2063544

Please sign in to comment.