pub struct DecomposingNormalizerBorrowed<'a> { /* private fields */ }
Expand description
Borrowed version of a normalizer for performing decomposing normalization.
Implementations§
Source§impl DecomposingNormalizerBorrowed<'static>
impl DecomposingNormalizerBorrowed<'static>
Sourcepub const fn static_to_owned(self) -> DecomposingNormalizer
pub const fn static_to_owned(self) -> DecomposingNormalizer
Cheaply converts a [DecomposingNormalizerBorrowed<'static>
] into a DecomposingNormalizer
.
Note: Due to branching and indirection, using DecomposingNormalizer
might inhibit some
compile-time optimizations that are possible with DecomposingNormalizerBorrowed
.
Sourcepub const fn new_nfd() -> Self
pub const fn new_nfd() -> Self
NFD constructor using compiled data.
✨ Enabled with the compiled_data
Cargo feature.
Source§impl<'data> DecomposingNormalizerBorrowed<'data>
impl<'data> DecomposingNormalizerBorrowed<'data>
Sourcepub fn normalize_iter<I: Iterator<Item = char>>(
&self,
iter: I,
) -> Decomposition<'data, I> ⓘ
pub fn normalize_iter<I: Iterator<Item = char>>( &self, iter: I, ) -> Decomposition<'data, I> ⓘ
Wraps a delegate iterator into a decomposing iterator adapter by using the data already held by this normalizer.
Sourcepub fn normalize<'a>(&self, text: &'a str) -> Cow<'a, str>
pub fn normalize<'a>(&self, text: &'a str) -> Cow<'a, str>
Normalize a string slice into a Cow<'a, str>
.
Sourcepub fn split_normalized<'a>(&self, text: &'a str) -> (&'a str, &'a str)
pub fn split_normalized<'a>(&self, text: &'a str) -> (&'a str, &'a str)
Split a string slice into maximum normalized prefix and unnormalized suffix such that the concatenation of the prefix and the normalization of the suffix is the normalization of the whole input.
Sourcepub fn is_normalized(&self, text: &str) -> bool
pub fn is_normalized(&self, text: &str) -> bool
Check whether a string slice is normalized.