{!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 Equals | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Equals

    Equals(string)

    Returns true if this string and another are equal.

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

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(ReadOnly)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(NativeText.ReadOnly other)
    Parameters
    Type Name Description
    NativeText.ReadOnly other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(NativeText)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(NativeText other)
    Parameters
    Type Name Description
    NativeText other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(FixedString32Bytes)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(FixedString32Bytes other)
    Parameters
    Type Name Description
    FixedString32Bytes other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(FixedString64Bytes)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(FixedString64Bytes other)
    Parameters
    Type Name Description
    FixedString64Bytes other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(FixedString128Bytes)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(FixedString128Bytes other)
    Parameters
    Type Name Description
    FixedString128Bytes other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(FixedString512Bytes)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(FixedString512Bytes other)
    Parameters
    Type Name Description
    FixedString512Bytes other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(FixedString4096Bytes)

    Returns true if this string and another are equal.

    Declaration
    public bool Equals(FixedString4096Bytes other)
    Parameters
    Type Name Description
    FixedString4096Bytes other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if the two strings are equal.

    Remarks

    Two strings are equal if they have equal length and all their characters match.

    Equals(object)

    Returns true if this string and another object are equal.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed object")]
    public override bool Equals(object other)
    Parameters
    Type Name Description
    object other

    Another string to compare with.

    Returns
    Type Description
    bool

    True if this string and the object are equal.

    Overrides
    ValueType.Equals(object)
    Remarks

    For the object to be equal, it must itself be a managed string, NativeText, or FixedStringNBytes.

     Two strings are equal if they have equal length and all their characters match.
    
    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)