Allow user to modify zero_pad_left MACRO's padding

Add optional pad length argument
This commit is contained in:
Roan Horning 2022-10-01 12:51:11 -04:00
parent 6ac65212d7
commit b0d31ee507
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -1,6 +1,11 @@
<!--% MACRO zero_pad_left(word) BLOCK %--> <!--% MACRO zero_pad_left(word, pad_length) BLOCK %-->
<!--% IF pad_length %-->
<!--% zero_pad_format = "%0${pad_length}s" %-->
<!--% ELSE %-->
<!--% zero_pad_format = "%04s" %-->
<!--% END %-->
<!--% USE String(word) %--> <!--% USE String(word) %-->
<!--% String.format("%04s") %--> <!--% String.format(zero_pad_format) %-->
<!--% END %--> <!--% END %-->
<!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %--> <!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %-->