Trait ar_reshaper::ArabicReshaperExt
source · pub trait ArabicReshaperExt: Iterator + Sizedwhere
Self::Item: AsRef<str>,{
// Provided methods
fn reshape_default(self) -> ArabicReshaperIter<Self> ⓘ { ... }
fn reshape_with_config(
self,
config: ReshaperConfig
) -> ArabicReshaperIter<Self> ⓘ { ... }
}Expand description
Wrap an iterator to reshape strings
Provided Methods§
sourcefn reshape_default(self) -> ArabicReshaperIter<Self> ⓘ
fn reshape_default(self) -> ArabicReshaperIter<Self> ⓘ
Reshape the iterator with the default ArabicReshaper config
Examples found in repository?
examples/reshape_iterator.rs (line 11)
3 4 5 6 7 8 9 10 11 12 13 14
fn main() {
let lines = [
"به نام خدا",
"همه چی درست میشه!",
"راست خیلی قشنگه ها",
"ازش خوشم میاد",
];
for line in lines.iter().reshape_default() {
println!("{line}");
}
}sourcefn reshape_with_config(self, config: ReshaperConfig) -> ArabicReshaperIter<Self> ⓘ
fn reshape_with_config(self, config: ReshaperConfig) -> ArabicReshaperIter<Self> ⓘ
Reshape the iterator using the given config