{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method CompareTo | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CompareTo

    CompareTo(string)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed string")]
    public int CompareTo(string other)
    Parameters
    Type Name Description
    string other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(ReadOnly)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(NativeText.ReadOnly other)
    Parameters
    Type Name Description
    NativeText.ReadOnly other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(NativeText)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(NativeText other)
    Parameters
    Type Name Description
    NativeText other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(FixedString32Bytes)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(FixedString32Bytes other)
    Parameters
    Type Name Description
    FixedString32Bytes other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(FixedString64Bytes)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(FixedString64Bytes other)
    Parameters
    Type Name Description
    FixedString64Bytes other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(FixedString128Bytes)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(FixedString128Bytes other)
    Parameters
    Type Name Description
    FixedString128Bytes other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(FixedString512Bytes)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(FixedString512Bytes other)
    Parameters
    Type Name Description
    FixedString512Bytes other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    

    CompareTo(FixedString4096Bytes)

    Returns the lexicographical sort order of this string relative to another.

    Declaration
    public int CompareTo(FixedString4096Bytes other)
    Parameters
    Type Name Description
    FixedString4096Bytes other

    Another string to compare with.

    Returns
    Type Description
    int

    A number denoting the lexicographical sort order of this string relative to the other string:

     0 denotes both strings have the same sort position.<br />
     -1 denotes that this string should be sorted to precede the other.<br />
     +1 denotes that this string should be sorted to follow the other.<br />
    
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)