/[cvs]/nfo/perl/libs/Data/Mungle/Transform/String.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Mungle/Transform/String.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by root, Fri Jan 31 01:22:19 2003 UTC revision 1.3 by joko, Thu Feb 20 21:23:34 2003 UTC
# Line 1  Line 1 
1  ## ---------------------------------------------------------------------------  ## -------------------------------------------------------------------------
2  ##  $Id$  ##  $Id$
3  ## ---------------------------------------------------------------------------  ## -------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.3  2003/02/20 21:23:34  joko
6    ##  using 'trim_space' from Pitonyak::StringUtil as a replacement for our 'trim'
7    ##
8  ##  Revision 1.2  2003/01/31 01:22:19  root  ##  Revision 1.2  2003/01/31 01:22:19  root
9  ##  + sub getLastPart  ##  + sub getLastPart
10  ##  ##
11  ##  Revision 1.1  2003/01/19 03:27:36  joko  ##  Revision 1.1  2003/01/19 03:27:36  joko
12  ##  + initial check-in  ##  + initial check-in
13  ##  ## -------------------------------------------------------------------------
 ## ---------------------------------------------------------------------------  
14    
15    
16  package Data::Transform::String;  package Data::Transform::String;
# Line 19  use warnings; Line 21  use warnings;
21  require Exporter;  require Exporter;
22  our @ISA = qw( Exporter );  our @ISA = qw( Exporter );
23  our @EXPORT_OK = qw(  our @EXPORT_OK = qw(
24    stripHtml stripSpaces stripNewLines toReal trim getLastPart    stripHtml stripNewLines toReal getLastPart trim
25  );  );
26    
27    
28  sub stripHtml {  sub stripHtml {
29    my $html = shift;    my $html = shift;
30    my $result = '';    my $result = '';
# Line 39  sub stripHtml { Line 42  sub stripHtml {
42    return $result;    return $result;
43  }  }
44    
 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;  
 }  
   
45  sub trim {  sub trim {
46    my $string = shift;    Pitonyak::StringUtil::trim_space(@_);
   return stripSpaces($string);  
47  }  }
48    
49  sub stripNewLines {  sub stripNewLines {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed