index:Ej
Last Modified: 2002-02-12
--
Ruby/Romkan is a Romaji <-> Kana conversion library for Ruby. It can convert a Japanese Romaji string to a Japanese Kana string or vice versa.
Tha latest version of Ruby/Romkan is available at <URL:http://namazu.org/~satoru/ruby-romkan/> .
Set Ruby's charcode to EUC-JP. $KCODE="e"
String#to_kanaConvert a Kunrei or Hepburn Romaji string into a Kana string.
String#to_romaConver a Hiragana string into a Hepburn Romaji string.
String#to_hepburnConvert a Kunrei Romaji string into a Hepburn Romaji string.
String#to_kunreiConvert a Hepburn Romaji string into a Kunrei Romaji string.
String#to_kana!Destructive version of String#to_kana.
String#to_roma!Destructive version of String#to_roma.
String#to_hepburn!Destructive version of String#to_hepburn.
String#to_kunrei!Destructive version of String#to_kunrei.
String#consonant?Return true if self is a consonant.
String#vowel?Return true if self is a vowel.
String#expand_consonantExpand the trailing consonant into consonants. e.g. "z".expand_consonant => ["za", "ze", "zi", "zo", "zu"]
% irb irb(main):001:0> $KCODE="e" "e" irb(main):002:0> require 'romkan' true irb(main):003:0> "syatyou".to_kana "しゃちょう" irb(main):004:0> "しゃちょう".to_roma "shachou" irb(main):005:0> "syatyou".to_hepburn "shachou"
Ruby/Romkan is a free software with ABSOLUTELY NO WARRANTY under the terms of the Ruby's licence.
--
satoru@namazu.org