--- nfo/perl/libs/Data/Mungle/Transform/String.pm 2003/01/31 01:22:19 1.2 +++ nfo/perl/libs/Data/Mungle/Transform/String.pm 2003/02/20 21:23:34 1.3 @@ -1,14 +1,16 @@ -## --------------------------------------------------------------------------- -## $Id: String.pm,v 1.2 2003/01/31 01:22:19 root Exp $ -## --------------------------------------------------------------------------- +## ------------------------------------------------------------------------- +## $Id: String.pm,v 1.3 2003/02/20 21:23:34 joko Exp $ +## ------------------------------------------------------------------------- ## $Log: String.pm,v $ +## Revision 1.3 2003/02/20 21:23:34 joko +## using 'trim_space' from Pitonyak::StringUtil as a replacement for our 'trim' +## ## Revision 1.2 2003/01/31 01:22:19 root ## + sub getLastPart ## ## Revision 1.1 2003/01/19 03:27:36 joko ## + initial check-in -## -## --------------------------------------------------------------------------- +## ------------------------------------------------------------------------- package Data::Transform::String; @@ -19,9 +21,10 @@ require Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( - stripHtml stripSpaces stripNewLines toReal trim getLastPart + stripHtml stripNewLines toReal getLastPart trim ); + sub stripHtml { my $html = shift; my $result = ''; @@ -39,18 +42,8 @@ return $result; } -sub stripSpaces { - my $text = shift; - #print "text: $text", "\n"; - #print "ord: ", ord(substr($text, 0, 1)), "\n"; - $text =~ s/^\s*//g; - $text =~ s/\s*$//g; - return $text; -} - sub trim { - my $string = shift; - return stripSpaces($string); + Pitonyak::StringUtil::trim_space(@_); } sub stripNewLines {