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

    Show / Hide Table of Contents

    Method StrCmp

    StrCmp(byte*, int, byte*, int)

    Compares two UTF-8 buffers for relative equality.

    Declaration
    public static int StrCmp(byte* utf8BufferA, int utf8LengthInBytesA, byte* utf8BufferB, int utf8LengthInBytesB)
    Parameters
    Type Name Description
    byte* utf8BufferA

    The first buffer of UTF-8 text.

    int utf8LengthInBytesA

    The length in bytes of the first UTF-8 buffer.

    byte* utf8BufferB

    The second buffer of UTF-8 text.

    int utf8LengthInBytesB

    The length in bytes of the second UTF-8 buffer.

    Returns
    Type Description
    int

    Less than zero if first different code point is less in the first UTF-8 buffer. Zero if the strings are identical. More than zero if first different code point is less in the second UTF-8 buffer.

    StrCmp(char*, int, char*, int)

    Compares two UTF-16 buffers for relative equality.

    Declaration
    public static int StrCmp(char* utf16BufferA, int utf16LengthInCharsA, char* utf16BufferB, int utf16LengthInCharsB)
    Parameters
    Type Name Description
    char* utf16BufferA

    The first buffer of UTF-16 text.

    int utf16LengthInCharsA

    The length in chars of the first UTF-16 buffer.

    char* utf16BufferB

    The second buffer of UTF-16 text.

    int utf16LengthInCharsB

    The length in chars of the second UTF-16 buffer.

    Returns
    Type Description
    int

    Less than zero if first different code point is less in the first UTF-16 buffer. Zero if the strings are identical. More than zero if first different code point is less in the second UTF-16 buffer.

    StrCmp(byte*, int, char*, int)

    Compares a UTF-8 buffer and a UTF-16 buffer for relative equality.

    Declaration
    public static int StrCmp(byte* utf8Buffer, int utf8LengthInBytes, char* utf16Buffer, int utf16LengthInChars)
    Parameters
    Type Name Description
    byte* utf8Buffer

    The buffer of UTF-8 text.

    int utf8LengthInBytes

    The length in bytes of the UTF-8 buffer.

    char* utf16Buffer

    The buffer of UTF-16 text.

    int utf16LengthInChars

    The length in chars of the UTF-16 buffer.

    Returns
    Type Description
    int

    Less than zero if first different code point is less in UTF-8 buffer. Zero if the strings are identical. More than zero if first different code point is less in UTF-16 buffer.

    StrCmp(char*, int, byte*, int)

    Compares a UTF-16 buffer and a UTF-8 buffer for relative equality.

    Declaration
    public static int StrCmp(char* utf16Buffer, int utf16LengthInChars, byte* utf8Buffer, int utf8LengthInBytes)
    Parameters
    Type Name Description
    char* utf16Buffer

    The buffer of UTF-16 text.

    int utf16LengthInChars

    The length in chars of the UTF-16 buffer.

    byte* utf8Buffer

    The buffer of UTF-8 text.

    int utf8LengthInBytes

    The length in bytes of the UTF-8 buffer.

    Returns
    Type Description
    int

    Less than zero if first different code point is less in UTF-16 buffer. Zero if the strings are identical. More than zero if first different code point is less in UTF-8 buffer.

    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)