[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

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

revision 1.301, Fri Jun 24 21:39:14 2005 UTC revision 1.302, Tue Jun 28 17:25:04 2005 UTC
# Line 1624  Line 1624 
1624      close(F);      close(F);
1625  }  }
1626    
1627    =head3 clean_spaces
1628    
1629    Remove any extra spaces from input fields. This will (currently) remove ^\s, \s$, and concatenate multiple spaces into one.
1630    
1631    my $input=$fig->clean_spaces($cgi->param('input'));
1632    
1633    =cut
1634    
1635    sub clean_spaces
1636    {
1637     my ($self, $s)=@_;
1638     # note at the moment I do not use \s because that recognizes \t and \n too. This should only remove multiple spaces.
1639     $s =~ s/^ +//;
1640     $s =~ s/ +$//;
1641     $s =~ s/ +/ /g;
1642     return $s;
1643    }
1644    
1645    
1646    
1647  =head3 cgi_url  =head3 cgi_url
1648    
1649  C<< my $url = FIG::$fig->cgi_url(); >>  C<< my $url = FIG::$fig->cgi_url(); >>

Legend:
Removed from v.1.301  
changed lines
  Added in v.1.302

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3