Skip to content

Add the uppercase B conversion specifier to printf#1300

Merged
jart merged 1 commit intojart:masterfrom
GabrielRavier:feat/add-uppercase-b-conversion-specifier-to-printf
Sep 26, 2024
Merged

Add the uppercase B conversion specifier to printf#1300
jart merged 1 commit intojart:masterfrom
GabrielRavier:feat/add-uppercase-b-conversion-specifier-to-printf

Conversation

@GabrielRavier
Copy link
Copy Markdown
Collaborator

The (uppercase) B conversion specifier is specified by the C standard to
have the same behavior as the (lowercase) b conversion specifier, except
that whenever the # flag is used, the (uppercase) B conversion specifier
alters a nonzero result by prefixing it with "0B", instead of with "0b".

This commit adds this conversion specifier alongside a few tests for it.

@GabrielRavier GabrielRavier requested a review from jart September 22, 2024 23:28
@github-actions github-actions bot added the libc label Sep 22, 2024
The (uppercase) B conversion specifier is specified by the C standard to
have the same behavior as the (lowercase) b conversion specifier, except
that whenever the # flag is used, the (uppercase) B conversion specifier
alters a nonzero result by prefixing it with "0B", instead of with "0b".

This commit adds this conversion specifier alongside a few tests for it.
@GabrielRavier GabrielRavier force-pushed the feat/add-uppercase-b-conversion-specifier-to-printf branch from be6d2d8 to 572cf21 Compare September 23, 2024 09:15
Copy link
Copy Markdown
Owner

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jart jart merged commit 333c3d1 into jart:master Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants