= private = protected
kconv(str, to_enc, from_enc=nil)
Convert str to to_enc. to_enc and from_enc are given as constants of Kconv or Encoding objects.
# File ext/nkf/lib/kconv.rb, line 57 def kconv(str, to_enc, from_enc=nil) opt = '' opt += ' --ic=' + from_enc.to_s if from_enc opt += ' --oc=' + to_enc.to_s if to_enc ::NKF::nkf(opt, str) end