projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b8fd58
)
new helper function trimFields()
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 21 Apr 2010 13:22:51 +0000
(15:22 +0200)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 21 Apr 2010 13:22:51 +0000
(15:22 +0200)
lib/ZOOM/IRSpy/Utils.pm
patch
|
blob
|
history
diff --git
a/lib/ZOOM/IRSpy/Utils.pm
b/lib/ZOOM/IRSpy/Utils.pm
index
868639b
..
4f2580c
100644
(file)
--- a/
lib/ZOOM/IRSpy/Utils.pm
+++ b/
lib/ZOOM/IRSpy/Utils.pm
@@
-104,6
+104,15
@@
sub isodate {
$year+1900, $mon+1, $mday, $hour, $min, $sec);
}
+# strips whitespaces and start and ends of fields
+sub trimFields {
+ my $field = shift;
+
+ $field =~ s/^\s+//;
+ $field =~ s/\s+$//;
+
+ return $field;
+}
# I can't -- just can't, can't, can't -- believe that this function
# isn't provided by one of the core XML modules. But the evidence all