format payees and memo on transactions
[chaz/homebank2ledger] / lib / App / HomeBank2Ledger / Util.pm
index d48f5d671639e70a41bf8d7fd52eeb48f802d04b..9f5b853f27dd3a9d505dcd008c3acf2428339d83 100644 (file)
@@ -8,7 +8,7 @@ use Exporter qw(import);
 
 our $VERSION = '9999.999'; # VERSION
 
-our @EXPORT_OK = qw(commify);
+our @EXPORT_OK = qw(commify rtrim);
 
 =func commify
 
@@ -29,4 +29,18 @@ sub commify {
     return scalar reverse $str;
 }
 
+=func rtrim
+
+    $trimmed_str = rtrim($str);
+
+Right-trim a string.
+
+=cut
+
+sub rtrim {
+    my $str = shift;
+    $str =~ s/\h+$//;
+    return $str;
+}
+
 1;
This page took 0.01815 seconds and 4 git commands to generate.