FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StringComparison

    enum · ferroui-base · v0.5.0

    enum StringComparison
    

    Specifies the culture, case, and sort rules to be used by the comparisons of strings.

    View source

    Members

    CurrentCulture

    CurrentCulture = 0
    

    Compare strings using culture-sensitive sort rules and the current culture.

    Source

    CurrentCultureIgnoreCase

    CurrentCultureIgnoreCase = 1
    

    Compare strings using culture-sensitive sort rules, the current culture, and ignoring the case of the strings being compared.

    Source

    InvariantCulture

    InvariantCulture = 2
    

    Compare strings using culture-sensitive sort rules and the invariant culture.

    Source

    InvariantCultureIgnoreCase

    InvariantCultureIgnoreCase = 3
    

    Compare strings using culture-sensitive sort rules, the invariant culture, and ignoring the case of the strings being compared.

    Source

    Ordinal

    Ordinal = 4
    

    Compare strings using ordinal (binary) sort rules.

    Source

    OrdinalIgnoreCase

    OrdinalIgnoreCase = 5
    

    Compare strings using ordinal (binary) sort rules and ignoring the case of the strings being compared.

    Source

    compare

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

    Compares two strings (string.Compare(a, b, comparison)).

    Source

    equals

    fn equals(self: Self, a: Option<&str>, b: Option<&str>) -> bool
    

    Whether two strings, either of which may be null, are equal (string.Equals(a, b, comparison)).

    Source

    starts_with

    fn starts_with(self: Self, source: &str, prefix: &str) -> bool
    

    Whether source starts with prefix (source.StartsWith(prefix, comparison)).

    Source

    index_of

    fn index_of(self: Self, source: &str, value: &str) -> i32
    

    The position of the first occurrence of value in source in UTF-16 code units, or -1 (source.IndexOf(value, comparison)).

    Source

    contains

    fn contains(self: Self, source: &str, value: &str) -> bool
    

    Whether value occurs in source (source.Contains(value, comparison)).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ResourceKeyObject
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Hash

    Availability

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