Method: String#ord
- Defined in:
- string.c
#ord ⇒ Integer
:include: doc/string/ord.rdoc
10780 10781 10782 10783 10784 10785 10786 10787 |
# File 'string.c', line 10780
static VALUE
rb_str_ord(VALUE s)
{
unsigned int c;
c = rb_enc_codepoint(RSTRING_PTR(s), RSTRING_END(s), STR_ENC_GET(s));
return UINT2NUM(c);
}
|