Function to_halfwidth

Source
pub fn to_halfwidth(ch: char) -> Option<char>
Expand description

Returns the half-width form for ch. If no half-width form for ch exists, or ch is already in half-width form, returns None.

§Example

assert_eq!(unicode_hfwidth::to_halfwidth('カ'), Some('カ'));
assert_eq!(unicode_hfwidth::to_halfwidth('a'), None);