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

libcore: char::to_digit inconsistent with char::is_digit #4288

Closed
Kimundi opened this issue Dec 25, 2012 · 0 comments
Closed

libcore: char::to_digit inconsistent with char::is_digit #4288

Kimundi opened this issue Dec 25, 2012 · 0 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Milestone

Comments

@Kimundi
Copy link
Member

Kimundi commented Dec 25, 2012

to_digit converts an ascii char of the range 0-z (or 0-Z) to a number in the range 0-35, is_digit on the other hand returns true if the character lies in one of the 3 numeric unicode ranges (of wich only one represents the numbers 0-9 as such).

Possible solution: rename and create to_digit_ascii and is_digit_ascii, and move/rename is_digit to the unicodenamespace?

@Kimundi Kimundi closed this as completed Feb 27, 2013
bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
Closes rust-lang#4288

And we get to drop a method, which I think is a win :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

1 participant