I am using utils.stringFormat() to create a text-based report and have some questions regarding its capabilities.
Here is the text output that is being generated:
Here is the code that generates the output:
- Code: Select all
var values = [ line_number, index, description, charge, sales_tax ]
utils.stringFormat( '%1$5.0f %2$7s %3$50s %4$8.2f %5$8.2f', values )
This is the desired output:
1st Column: What is the specification ('%1$5.0f') to add leading zeros to the 'line_number'?
2nd Column: What is the specification ('%3$50s') to left-justify the 'description''?
Any help is greatly appreciated!