Method: U::String#to_i
- Defined in:
- ext/u/rb_u_string_to_i.c
#to_i(base = 16) ⇒ Integer
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'ext/u/rb_u_string_to_i.c', line 32 VALUE rb_u_string_to_i(int argc, VALUE *argv, VALUE self) { int base = 10; VALUE rbbase; if (rb_scan_args(argc, argv, "01", &rbbase) == 1) base = NUM2INT(rbbase); if (base < 0) rb_u_raise(rb_eArgError, "illegal radix %d", base); return rb_u_string_to_inum(self, base, false); } |