-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
std.fmt.hex: support integer sizes that are not powers of two #23819
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
base: master
Are you sure you want to change the base?
Conversation
Would we also want to support integer sizes that are not a multiple of 8? Not exactly saying we should, but I am wondering if there is merit to making this work for all unsigned integers. |
That's a good idea. Let me work on that. |
While you're at it do you mind adding a |
My idea was to introduce a hexOptions function with options for that, and then reimplementing hex on that. I am balancing school, life, and hobbies, so this won't get done very quickly. |
Not sure which option this function would ever need beside case. Also I'm guessing that would be biased towards lowercase as the default which I can't say I'm a fan of. It's fine to break code if you're worried about that. |
By default, |
e9b0a43
to
6acc69d
Compare
Marking draft until I fix all the bugs :/ |
Fixes #23799
This changes the return type, but I don't know of any targets where this is actually breaking change.