chiark / gitweb /
commitid.scad.pl: make rjustt put prefix after pad
[reprap-play.git] / commitid.scad.pl
index fbeed6fe1a4518f42374901c003303f342b3d7c3..83e3afe642e719c3105f119dea7805d2a2cfb8e3 100755 (executable)
@@ -275,8 +275,8 @@ sub rjustt ($$;$) { # right justify and truncate (ie, pad and truncate at left)
     my $lw = length $whole;
     my $spare = $sz - $lw - (length $prefix);
     return
-       $prefix.
        ($spare > 0 ? (' ' x $spare) : '').
+       $prefix.
        substr($whole, ($spare < 0 ? -$spare : 0));
 }