Mercurial > hg > foxridge-archiver
comparison MPIWGStor.pm @ 30:398ef4b8f072
added -online-base option to makemeta-lib
author | casties |
---|---|
date | Mon, 12 Jun 2006 19:01:39 +0200 |
parents | 2890dd75d2f6 |
children | 4d958249d337 |
comparison
equal
deleted
inserted
replaced
29:f77f6cb40c4f | 30:398ef4b8f072 |
---|---|
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 # | 157 # |
158 # $name = sstrip($name) | 158 # $name = sstrip($name, $slash) |
159 # | 159 # |
160 # strips leading and trailing whitespace from $name | 160 # strips leading and trailing whitespace from $name |
161 # replaces double slashes with single ones with $slash. | |
161 # | 162 # |
162 sub sstrip { | 163 sub sstrip { |
163 my ($name) = @_; | 164 my ($name, $slash) = @_; |
164 | 165 |
165 if ($name =~ /^\s*(.*?)\s*$/) { | 166 if ($name =~ /^\s*(.*?)\s*$/) { |
166 return $1; | 167 $name = $1; |
168 } | |
169 if ($slash) { | |
170 # trim multiple slashes | |
171 $name =~ s/\/+/\//g; | |
167 } | 172 } |
168 return $name; | 173 return $name; |
169 } | 174 } |
170 | 175 |
171 | 176 |