to_half_width

Function to_half_width 

Source
pub fn to_half_width(input: &str) -> String
Expand description

Normalize input data

Japanese character has Zenkaku(Full-width) and Hankaku(Half-width) mode. For example,

ZenkakuHankaku
1
A

Input data should be normalized beforehand because both are often used in common.

§Example

use wareki_conv::conv::to_half_width;

assert_eq!(to_half_width("R01.02.03"), "R01.02.03");
assert_eq!(to_half_width("昭和15年12月31日"), "昭和15年12月31日");