[−][src]Crate kana
Converters of troublesome characters included in Japanese texts.
- Half-width-kana[半角カナ;HANKAKU KANA] -> normal Katakana
- Wide-alphanumeric[全角英数;ZENKAKU EISU] <-> normal ASCII
Example
extern crate kana; use kana::*; fn main() { let s1 = "マツオ バショウ ア゚"; assert_eq!("マツオ バショウ ア ゚", half2kana(s1)); assert_eq!("マツオ バショウ ア゚", half2full(s1)); let s2 = "ひ゜ひ゛んは゛"; assert_eq!("ぴびんば", combine(s2)); assert_eq!("ひ ゚ひ ゙んは ゙", vsmark2combi(s2)); let s3 = "#&Rust-1.6!"; assert_eq!("#&Rust-1.6!", wide2ascii(s3)); }
Functions
ascii2wide | Convert normal ASCII characters into Wide-alphanumeric [A -> A] |
combine | Combine base characters and diacritical marks on Hiragana/Katakana [がハ゜ -> がパ] |
half2full | Convert Half-width-kana into normal Katakana with diacritical marks separated [ア゙パ -> ア゙パ] |
half2kana | Convert Half-width-kana into normal Katakana with diacritical marks combined [ア゙パ -> ア゙パ] |
hira2kata | Convert Hiragana into Katakana [あ -> ア] |
kata2hira | Convert Katakana into Hiragana [ア -> あ] |
nowidespace | Convert Wide-space into normal space [" " -> " "] |
nowideyen | Convert Wide-yen into Half-width-yen ["¥" -> "¥"] |
space2wide | Convert normal space into Wide-space [" " -> " "] |
vsmark2half | Convert all separated Voiced-sound-marks into half-width style "\u{FF9E}" |
vsmark2full | Convert all separated Voiced-sound-marks into full-width style "\u{309B}" |
vsmark2combi | Convert all separated Voiced-sound-marks into space+combining style "\u{20}\u{3099}" |
wide2ascii | Convert Wide-alphanumeric into normal ASCII [A -> A] |
yen2wide | Convert Half-width-yen into Wide-yen ["¥" -> "¥"] |