impl ComposingNormalizer { /// Construct a new ComposingNormalizer instance for NFC using compiled data. #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfc, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::new_nfc,
FnInStruct,
hidden
)] #[diplomat::attr(auto, named_constructor = "nfc")] #[diplomat::demo(default_constructor)] #[cfg(feature = "compiled_data")] pubfn create_nfc() -> Box<ComposingNormalizer> { Box::new(ComposingNormalizer(
icu_normalizer::ComposingNormalizer::new_nfc().static_to_owned(),
))
} /// Construct a new ComposingNormalizer instance for NFC using a particular data source. #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfc, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::new_nfc,
FnInStruct,
hidden
)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfc_with_provider")] #[cfg(feature = "buffer_provider")] pubfn create_nfc_with_provider(
provider: &DataProvider,
) -> Result<Box<ComposingNormalizer>, DataError> {
Ok(Box::new(ComposingNormalizer(
icu_normalizer::ComposingNormalizer::try_new_nfc_with_buffer_provider(
provider.get()?,
)?,
)))
} /// Construct a new ComposingNormalizer instance for NFKC using compiled data. #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfkc, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::new_nfkc,
FnInStruct,
hidden
)] #[diplomat::attr(auto, named_constructor = "nfkc")] #[cfg(feature = "compiled_data")] pubfn create_nfkc() -> Box<ComposingNormalizer> { Box::new(ComposingNormalizer(
icu_normalizer::ComposingNormalizer::new_nfkc().static_to_owned(),
))
} /// Construct a new ComposingNormalizer instance for NFKC using a particular data source. #[diplomat::rust_link(icu::normalizer::ComposingNormalizer::new_nfkc, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::new_nfkc,
FnInStruct,
hidden
)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkc_with_provider")] #[cfg(feature = "buffer_provider")] pubfn create_nfkc_with_provider(
provider: &DataProvider,
) -> Result<Box<ComposingNormalizer>, DataError> {
Ok(Box::new(ComposingNormalizer(
icu_normalizer::ComposingNormalizer::try_new_nfkc_with_buffer_provider(
provider.get()?,
)?,
)))
} /// Normalize a string /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::normalize_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::normalize,
FnInStruct,
hidden
)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::normalize_to,
FnInStruct,
hidden
)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::normalize_utf8_to,
FnInStruct,
hidden
)] pubfn normalize(&self, s: &DiplomatStr, write: &mut DiplomatWrite) { let _infallible = self.0.as_borrowed().normalize_utf8_to(s, write);
}
/// Check if a string is normalized /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::is_normalized_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::is_normalized,
FnInStruct,
hidden
)] #[diplomat::attr(not(supports = utf8_strings), disable)] #[diplomat::attr(*, rename = "is_normalized")] pubfn is_normalized_utf8(&self, s: &DiplomatStr) -> bool { self.0.as_borrowed().is_normalized_utf8(s)
}
/// Check if a string is normalized /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::is_normalized_utf16,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), rename = "is_normalized")] #[diplomat::attr(supports = utf8_strings, rename = "is_normalized16")] pubfn is_normalized_utf16(&self, s: &DiplomatStr16) -> bool { self.0.as_borrowed().is_normalized_utf16(s)
}
/// Return the index a slice of potentially-invalid UTF-8 is normalized up to #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::split_normalized_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::split_normalized,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), disable)] #[diplomat::attr(*, rename = "is_normalized_up_to")] pubfn is_normalized_utf8_up_to(&self, s: &DiplomatStr) -> usize { self.0.as_borrowed().split_normalized_utf8(s).0.len()
}
/// Return the index a slice of potentially-invalid UTF-16 is normalized up to #[diplomat::rust_link(
icu::normalizer::ComposingNormalizerBorrowed::split_normalized_utf16,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), rename = "is_normalized_up_to")] #[diplomat::attr(supports = utf8_strings, rename = "is_normalized16_up_to")] pubfn is_normalized_utf16_up_to(&self, s: &DiplomatStr16) -> usize { self.0.as_borrowed().split_normalized_utf16(s).0.len()
}
}
/// Construct a new DecomposingNormalizer instance for NFD using a particular data source. #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::new_nfd, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::new_nfd,
FnInStruct,
hidden
)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfd_with_provider")] #[cfg(feature = "buffer_provider")] pubfn create_nfd_with_provider(
provider: &DataProvider,
) -> Result<Box<DecomposingNormalizer>, DataError> {
Ok(Box::new(DecomposingNormalizer(
icu_normalizer::DecomposingNormalizer::try_new_nfd_with_buffer_provider(
provider.get()?,
)?,
)))
}
/// Construct a new DecomposingNormalizer instance for NFKD using compiled data. #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::new_nfkd, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::new_nfkd,
FnInStruct,
hidden
)] #[diplomat::attr(auto, named_constructor = "nfkd")] #[cfg(feature = "compiled_data")] pubfn create_nfkd() -> Box<DecomposingNormalizer> { Box::new(DecomposingNormalizer(
icu_normalizer::DecomposingNormalizer::new_nfkd().static_to_owned(),
))
}
/// Construct a new DecomposingNormalizer instance for NFKD using a particular data source. #[diplomat::rust_link(icu::normalizer::DecomposingNormalizer::new_nfkd, FnInStruct)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::new_nfkd,
FnInStruct,
hidden
)] #[diplomat::attr(all(supports = fallible_constructors, supports = named_constructors), named_constructor = "nfkd_with_provider")] #[cfg(feature = "buffer_provider")] pubfn create_nfkd_with_provider(
provider: &DataProvider,
) -> Result<Box<DecomposingNormalizer>, DataError> {
Ok(Box::new(DecomposingNormalizer(
icu_normalizer::DecomposingNormalizer::try_new_nfkd_with_buffer_provider(
provider.get()?,
)?,
)))
}
/// Normalize a string /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::normalize_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::normalize,
FnInStruct,
hidden
)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::normalize_to,
FnInStruct,
hidden
)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::normalize_utf8_to,
FnInStruct,
hidden
)] pubfn normalize(&self, s: &DiplomatStr, write: &mut DiplomatWrite) { let _infallible = self.0.as_borrowed().normalize_utf8_to(s, write);
}
/// Check if a string is normalized /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::is_normalized_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::is_normalized,
FnInStruct,
hidden
)] #[diplomat::attr(not(supports = utf8_strings), disable)] #[diplomat::attr(*, rename = "is_normalized")] pubfn is_normalized(&self, s: &DiplomatStr) -> bool { self.0.as_borrowed().is_normalized_utf8(s)
}
/// Check if a string is normalized /// /// Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according /// to the WHATWG Encoding Standard. #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::is_normalized_utf16,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), rename = "is_normalized")] #[diplomat::attr(supports = utf8_strings, rename = "is_normalized16")] pubfn is_normalized_utf16(&self, s: &DiplomatStr16) -> bool { self.0.as_borrowed().is_normalized_utf16(s)
}
/// Return the index a slice of potentially-invalid UTF-8 is normalized up to #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::split_normalized_utf8,
FnInStruct
)] #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::split_normalized,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), disable)] #[diplomat::attr(*, rename = "is_normalized_up_to")] pubfn is_normalized_up_to(&self, s: &DiplomatStr) -> usize { self.0.as_borrowed().split_normalized_utf8(s).0.len()
}
/// Return the index a slice of potentially-invalid UTF-16 is normalized up to #[diplomat::rust_link(
icu::normalizer::DecomposingNormalizerBorrowed::split_normalized_utf16,
FnInStruct
)] #[diplomat::attr(not(supports = utf8_strings), rename = "is_normalized_up_to")] #[diplomat::attr(supports = utf8_strings, rename = "is_normalized16_up_to")] pubfn is_normalized_utf16_up_to(&self, s: &DiplomatStr16) -> usize { self.0.as_borrowed().split_normalized_utf16(s).0.len()
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.