Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add # flag support for b specifier #29

Closed
NotSqrt opened this issue Sep 19, 2018 · 1 comment
Closed

Feature: add # flag support for b specifier #29

NotSqrt opened this issue Sep 19, 2018 · 1 comment

Comments

@NotSqrt
Copy link

NotSqrt commented Sep 19, 2018

Hi,

It would be really nice if printf("%#b", 6) == "0b110" !

Thanks !

@mpaland
Copy link
Owner

mpaland commented Sep 19, 2018

I think that is not conform to the standard, but the binary %b output representation isn't that as well. It's a logical enhancement. 😉
So, yeah, I think, returning 0b as prefix would make sense.
Other opinions here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants