Configure field width and precision
mainField Width
Specifies the total field width for the conversion, adding padding. If the width is specified as *, the value is read from the next argument in the varargs.
Precision
Prefixed with a ., specifies the precision of the number or string. If precision is specified as *, the value is read from the next argument in the varargs.
Constraints and Behavior
- Cap: Both field widths and precisions are capped at 65280. This cap applies to both literal numbers in the format string and values provided via
*. - Negative Width: A negative
*field width is left-justified at its magnitude. - Negative Precision: A negative
*precision is discarded (after applying the cap).