pub struct CompareInfo { /* private fields */ }Expand description
Implements a set of methods for culture-sensitive string comparisons: the comparer of a culture.
Implementations§
Source§impl CompareInfo
impl CompareInfo
Sourcepub fn invariant() -> CompareInfo
pub fn invariant() -> CompareInfo
The comparer of the invariant culture.
Sourcepub fn compare(&self, a: &str, b: &str, options: CompareOptions) -> Ordering
pub fn compare(&self, a: &str, b: &str, options: CompareOptions) -> Ordering
Compares two strings using the specified options.
Sourcepub fn is_prefix(
&self,
source: &str,
prefix: &str,
options: CompareOptions,
) -> bool
pub fn is_prefix( &self, source: &str, prefix: &str, options: CompareOptions, ) -> bool
Determines whether source starts with prefix using the specified
options.
Sourcepub fn index_of(
&self,
source: &str,
value: &str,
options: CompareOptions,
) -> i32
pub fn index_of( &self, source: &str, value: &str, options: CompareOptions, ) -> i32
Searches for value in source using the specified options and
returns the position of its first occurrence in UTF-16 code units,
or -1. An empty value is found at 0.
Sourcepub fn to_upper_ordinal(c: char) -> char
pub fn to_upper_ordinal(c: char) -> char
The upper-case form of a character under the invariant simple case
mapping, the mapping of the ordinal comparison that ignores case: one
character maps to one character (no expansions: ß stays ß), no
culture is involved, and the dotless ı (U+0131) and the long ſ
(U+017F) keep their identity, as in the reference runtime.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompareInfo
impl !Send for CompareInfo
impl !Sync for CompareInfo
impl !UnwindSafe for CompareInfo
impl Freeze for CompareInfo
impl Unpin for CompareInfo
impl UnsafeUnpin for CompareInfo
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more