FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompareInfo

    struct · ferroui-base · v0.5.0

    struct CompareInfo
    

    Implements a set of methods for culture-sensitive string comparisons: the comparer of a culture.

    View source

    Members

    invariant

    fn invariant() -> CompareInfo
    

    The comparer of the invariant culture.

    Source

    name

    fn name(self: &Self) -> &str
    

    The name of the culture used for the comparisons.

    Source

    compare

    fn compare(self: &Self, a: &str, b: &str, options: CompareOptions) -> Ordering
    

    Compares two strings using the specified options.

    Source

    is_prefix

    fn is_prefix(self: &Self, source: &str, prefix: &str, options: CompareOptions) -> bool
    

    Determines whether source starts with prefix using the specified options.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.