Trim() phrase before putting it to karma

This commit is contained in:
eleksir
2020-12-01 19:47:13 +03:00
parent 1031fe9242
commit 0256f6b45b
2 changed files with 4 additions and 2 deletions

View File

@@ -60,6 +60,8 @@ sub logger {
sub trim {
my $str = shift;
return $str if ($str eq '');
while (substr ($str, 0, 1) =~ /^\s$/xms) {
$str = substr ($str, 1);
}