From 9868574ae43c0fdc49a9d3fc0431bb0613507bfa Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 29 Oct 1999 09:25:48 +0000 Subject: 19991029 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/nkf/lib/kconv.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ext') diff --git a/ext/nkf/lib/kconv.rb b/ext/nkf/lib/kconv.rb index bfd276330..af6d82275 100644 --- a/ext/nkf/lib/kconv.rb +++ b/ext/nkf/lib/kconv.rb @@ -56,3 +56,18 @@ module Kconv end module_function :guess end + +class String + def kconv(out_code, in_code=Kconv::AUTO) + Kconv::kconv(self, out_code, in_code) + end + def tojis + NKF::nkf('-j', self) + end + def toeuc + NKF::nkf('-e', self) + end + def tosjis + NKF::nkf('-s', self) + end +end -- cgit