Integer Formatter
Backend for formatting integers by string pattern.
Format description: +0(number)b|B|x|X
+- forces to proceed the result with a plus or minus sign (+ or -) even for positive numbers. By default, only negative numbers are preceded with a minus sign.0- left-pads the number with zeroes (0) instead of spaces when padding is specified.number- minimum number of characters to be printed. If the value to be printed is shorter than this number, the result is padded with blank spaces. The value is not truncated even if the result is larger.b|B- binary representation.x- hexadecimal representation.X- hexadecimal representation (uppercase).
Examples:
format="+05", number=3 => "+0003"
format="+5", number=3 => " +3"
format="x", number=255 => "ff"
format="04X", number=255 => "00FF"
Author
Alexander Kornilov (akornilov.82@gmail.com).
Parameters
pattern for formatting (see details above).