CompareInfo
struct · ferroui-base · v0.5.0
struct CompareInfo
Implements a set of methods for culture-sensitive string comparisons: the comparer of a culture.
Members
invariant
fn invariant() -> CompareInfo
The comparer of the invariant culture.
name
fn name(self: &Self) -> &str
The name of the culture used for the comparisons.
compare
fn compare(self: &Self, a: &str, b: &str, options: CompareOptions) -> Ordering
Compares two strings using the specified options.
is_prefix
fn is_prefix(self: &Self, source: &str, prefix: &str, options: CompareOptions) -> bool
Determines whether source starts with prefix using the specified
options.
index_of
fn index_of(self: &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.
to_upper_ordinal
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
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.