Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ruby_hex/string.rb
Instance Method Summary collapse
-
#dec ⇒ Object
Treats leading characters from str as a string of decimal digits (with an optional sign) and returns the corresponding number.
- #to_i(base = 0x10) ⇒ Object
Instance Method Details
#dec ⇒ Object
Treats leading characters from str as a string of decimal digits (with an optional sign) and returns the corresponding number. Zero is returned on error.
21 22 23 |
# File 'lib/ruby_hex/string.rb', line 21 def dec to_i(0xa) end |
#to_i(base = 0x10) ⇒ Object
14 15 16 |
# File 'lib/ruby_hex/string.rb', line 14 def to_i(base = 0x10) _origin_to_i(base) end |