forked from mpaland/printf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify/fix integer zero padding + hash flag
Handle 0x / 0b when width is equal to string size (issue mpaland#50): printf("%#4x", 0x1234); -> "0x1234" Do not print # prefix if it does not fit into PRINTF_NTOA_BUFFER_SIZE %#<prec>o is implemented as in libc: - printf("%#0o", 0); does output octal prefix ("0") - printf("%#3o", 1); printf "001" - padding zero is used as octal prefix (issue mpaland#53) Left padding and precision is handled correctly (issue mpaland#49): - printf("%-10.6d", 1024); -> "001024 "
- Loading branch information
Showing
1 changed file
with
43 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters