Method: Encoding#to_s

Defined in:
encoding.c

#nameString #to_sString

Returns the name of the encoding.

Encoding::UTF_8.name      #=> "UTF-8"

Overloads:



1140
1141
1142
1143
1144
# File 'encoding.c', line 1140

static VALUE
enc_name(VALUE self)
{
    return rb_fstring_cstr(rb_enc_name((rb_encoding*)DATA_PTR(self)));
}