VOOZH about

URL: https://apidock.com/ruby/String/kconv

⇱ String#kconv - APIdock


method

kconv

ruby latest stable - Class: String
kconv(to_enc, from_enc=nil)
public

Convert self to to_enc. to_enc and from_enc are given as constants of Kconv or Encoding objects.

# File ext/nkf/lib/kconv.rb, line 205
 def kconv(to_enc, from_enc=nil)
 from_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0]
 Kconv::kconv(self, to_enc, from_enc)
 end

Related methods