Method: String#chr

Defined in:
string.c

#chrString

Returns a string containing the first character of self:

s = 'foo' # => "foo"
s.chr     # => "f"

Returns:



6526
6527
6528
6529
6530
# File 'string.c', line 6526

static VALUE
rb_str_chr(VALUE str)
{
    return rb_str_substr(str, 0, 1);
}