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

Handle 0X in String to integer conversions #15237

Open
RX14 opened this issue Nov 29, 2024 · 1 comment
Open

Handle 0X in String to integer conversions #15237

RX14 opened this issue Nov 29, 2024 · 1 comment

Comments

@RX14
Copy link
Contributor

RX14 commented Nov 29, 2024

Currently String#to_unsigned_info handles only 0x, but sometimes 0X appears too. Should this be supported?

@straight-shoota
Copy link
Member

I suppose it makes sense to support this. Not sure if there would be a reason to make this configurable?
It should be fine to have case-insensitive prefix enabled by default, I think.

For reference, Python's int() supports this as well.

In any case, we should include the other base prefixes as well: 0X, 0O, 0B.

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