Skip to content

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

Closed
@Kimundi

Description

@Kimundi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions