summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/Utils.pm
diff options
context:
space:
mode:
authorSebastian2010-01-12 16:00:57 +0100
committerSebastian2010-01-12 16:00:57 +0100
commitabbb6c2b25c7e0b78a0e87cda6b64b902931a699 (patch)
tree6ab26f586d8f6bd59cf9ee3e0835289399457085 /lib/OpenSLX/Utils.pm
parentadded pbs stuff (diff)
downloadcore-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.tar.gz
core-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.tar.xz
core-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.zip
add trim to utils
Diffstat (limited to 'lib/OpenSLX/Utils.pm')
-rw-r--r--lib/OpenSLX/Utils.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm
index 096b6e5f..6e722c00 100644
--- a/lib/OpenSLX/Utils.pm
+++ b/lib/OpenSLX/Utils.pm
@@ -28,7 +28,7 @@ $VERSION = 1.01;
slurpFile spitFile appendFile
followLink
unshiftHereDoc
- string2Array
+ string2Array trim
chrootInto
mergeHash
getFQDN
@@ -687,4 +687,15 @@ sub isInPath
}
+sub trim
+{
+ my $string = shift;
+
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+
+ return $string;
+}
+
+
1;