Extract String#to_i
impl to scolapasta-int-parse
#2075
Labels
A-parser
Area: Parser implementations.
A-ruby-core
Area: Ruby Core types.
A-spec
Area: ruby/spec infrastructure and completeness.
Reuse the radix type. Add tests.
From what I can tell, ASCII whitespace is trimmed from front and back like
Kernel#Integer
.0x
-style prefixes are allowed but only if they match the given base orx
is in the given base's alphabet. If the given base does not match the0x
-style prefix, 0 is returned.Numbers are parsed from the front and parsing stops when encountering an ASCII alphanumeric not in the given base's char set:
The text was updated successfully, but these errors were encountered: