pub struct Collator { /* private fields */ }Expand description
compares texts in the order of a language (see the module comment); copy it freely
Implementations§
Source§impl Collator
impl Collator
Sourcepub fn new(tag: &str) -> Collator
pub fn new(tag: &str) -> Collator
the collator of a language (a BCP 47 tag or a POSIX name; unknown languages sort by the common rules); “-u-co-phonebk”, “-u-kn” and “-u-ks-level1 / 2 / 3 / identic” set the options as in ICU, also “de-DE_phoneb” (Windows) and “@collation=phonebook” (POSIX)
Sourcepub fn strength(self, s: u32) -> Collator
pub fn strength(self, s: u32) -> Collator
the same collator with another strength (COLL_PRIMARY .. COLL_IDENTICAL)
Sourcepub fn numeric(self, on: bool) -> Collator
pub fn numeric(self, on: bool) -> Collator
numbers by their value: “Datei 2” before “Datei 10”, “007” = “7” up to the tertiary level
Sourcepub fn phonebook(self, on: bool) -> Collator
pub fn phonebook(self, on: bool) -> Collator
German phone book order (ä = ae, ö = oe, ü = ue); no effect in other languages
Trait Implementations§
Auto Trait Implementations§
impl Forget for Collator
impl Freeze for Collator
impl RefUnwindSafe for Collator
impl Send for Collator
impl Sync for Collator
impl Unpin for Collator
impl UnsafeUnpin for Collator
impl UnwindSafe for Collator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more