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

Decoding strings without digits #117

Closed
oscbyspro opened this issue Jun 4, 2023 · 1 comment
Closed

Decoding strings without digits #117

oscbyspro opened this issue Jun 4, 2023 · 1 comment
Labels
bug please fix this :(
Milestone

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Jun 4, 2023

Integer decoding methods should return nil for strings without digits, like stdlib.

Int256(decoding:  "", radix: 10) // ⚠️ "0"
Int256(decoding: "+", radix: 10) // ⚠️ "0"
Int256(decoding: "-", radix: 10) // ⚠️ "0"
Int256(decoding: "~", radix: 10) // ⚠️ "0"

I fixed this a while ago in Numberick, but I have not had the time to port the fix yet.

@oscbyspro oscbyspro added this to the v3.0.0 milestone Jun 4, 2023
@oscbyspro
Copy link
Owner Author

For what it's worth, the decoding methods are also 2.5x faster in Numberick 🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug please fix this :(
Projects
None yet
Development

No branches or pull requests

1 participant