Trait deunicode::AsciiChars [−][src]
pub trait AsciiChars { fn ascii_chars(&self) -> AsciiCharsIter; fn to_ascii_lossy(&self) -> String; }
Convenience functions for deunicode. use deunicode::AsciiChars
Required Methods
ⓘImportant traits for AsciiCharsIter<'a>
fn ascii_chars(&self) -> AsciiCharsIter
Iterate over Unicode characters converted to ASCII sequences.
Items of this iterator may be None
for some characters.
Use .map(|ch| ch.unwrap_or("?"))
to replace invalid characters.
fn to_ascii_lossy(&self) -> String
Convert any Unicode string to ASCII-only string.
Characters are converted to closest ASCII equivalent.
Characters that can't be converted are replaced with "[?]"
.
Implementations on Foreign Types
impl AsciiChars for String
[src]
impl AsciiChars for String
ⓘImportant traits for AsciiCharsIter<'a>fn ascii_chars(&self) -> AsciiCharsIter
[src]
ⓘImportant traits for AsciiCharsIter<'a>
fn ascii_chars(&self) -> AsciiCharsIter
fn to_ascii_lossy(&self) -> String
[src]
fn to_ascii_lossy(&self) -> String
impl AsciiChars for str
[src]
impl AsciiChars for str
ⓘImportant traits for AsciiCharsIter<'a>fn ascii_chars(&self) -> AsciiCharsIter
[src]
ⓘImportant traits for AsciiCharsIter<'a>
fn ascii_chars(&self) -> AsciiCharsIter
fn to_ascii_lossy(&self) -> String
[src]
fn to_ascii_lossy(&self) -> String