summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/Utils.pm
diff options
context:
space:
mode:
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;