diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-29 09:25:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-29 09:25:48 +0000 |
commit | 0d684beafb4258da9606b1e3b4448511b709a2e2 (patch) | |
tree | 4a0007dc6a1e7e8ae71ad40000b9ba56332dbaf2 /ext/nkf | |
parent | cd2af215d4d438bcb217ffce94c208e229dfe58a (diff) |
19991029
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf')
-rw-r--r-- | ext/nkf/lib/kconv.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/nkf/lib/kconv.rb b/ext/nkf/lib/kconv.rb index bfd276330d..af6d82275f 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 |