Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
Changes the encoding to encoding and returns self.
 
               static VALUE
rb_str_force_encoding(VALUE str, VALUE enc)
{
    str_modifiable(str);
    rb_enc_associate(str, rb_to_encoding(enc));
    ENC_CODERANGE_CLEAR(str);
    return str;
}
            

Was this page useful?