meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
c:printf [2020/04/02 14:42] – created niziakprogramming:c:printf [2020/07/03 09:46] – ↷ Page moved from c:printf to programming:c:printf niziak
Line 11: Line 11:
 [[https://www.cplusplus.com/reference/cinttypes/]] [[https://www.cplusplus.com/reference/cinttypes/]]
 [[https://stackoverflow.com/questions/174612/cross-platform-format-string-for-variables-of-type-size-t/174674#174674]] [[https://stackoverflow.com/questions/174612/cross-platform-format-string-for-variables-of-type-size-t/174674#174674]]
 +
 +====== Float padding ======
 +
 +The field //width// includes the decimal point and the fractional portion (and the sign, if it's negative).
 +
 +
 +===== Padding negative numbers =====
 +Flags:
 +    * <code>-</code> Left-justify the given field width (see Width below). Right justification is the default.
 +    * <code>+</code> Forces a "+" sign to precede a number. Has no effect on negative numbers.
 +    * <code>(space)</code> One blank space is inserted before a positive number, while negative numbers are unaffected. This is useful for making positive and negative numbers vertically align in a visual stacked list.
 +
 +
 +
 +
 +