Expand description
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§
- Convert normal ASCII characters into Wide-alphanumeric [A -> A]
- Combine base characters and diacritical marks on Hiragana/Katakana [がハ゜ -> がパ]
- Convert Half-width-kana into normal Katakana with diacritical marks separated [ア゙パ -> ア゙パ]
- Convert Half-width-kana into normal Katakana with diacritical marks combined [ア゙パ -> ア゙パ]
- Convert Hiragana into Katakana [あ -> ア]
- Convert Katakana into Hiragana [ア -> あ]
- Convert Wide-space into normal space [“ “ -> “ “]
- Convert Wide-yen into Half-width-yen [“¥” -> “¥”]
- Convert normal space into Wide-space [“ “ -> “ “]
- Convert all separated Voiced-sound-marks into space+combining style “\u{20}\u{3099}”
- Convert all separated Voiced-sound-marks into full-width style “\u{309B}”
- Convert all separated Voiced-sound-marks into half-width style “\u{FF9E}”
- Convert Wide-alphanumeric into normal ASCII [A -> A]
- Convert Half-width-yen into Wide-yen [“¥” -> “¥”]