StrCmp
Compares two UTF-8 buffers for relative equality.
Read time 2 minutesLast updated 13 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
StrCmp(byte*, int, byte*, int)
Compares two UTF-8 buffers for relative equality.
public static int StrCmp(byte* utf8BufferA, int utf8LengthInBytesA, byte* utf8BufferB, int utf8LengthInBytesB)
Parameters
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.
public static int StrCmp(char* utf16BufferA, int utf16LengthInCharsA, char* utf16BufferB, int utf16LengthInCharsB)
Parameters
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.
public static int StrCmp(byte* utf8Buffer, int utf8LengthInBytes, char* utf16Buffer, int utf16LengthInChars)
Parameters
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.
public static int StrCmp(char* utf16Buffer, int utf16LengthInChars, byte* utf8Buffer, int utf8LengthInBytes)
Parameters
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. |