Equals
Returns true if this string and another have the same length and all the same characters.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
Equals(string)
Returns true if this string and another have the same length and all the same characters.
[ExcludeFromBurstCompatTesting("Takes managed string")]public bool Equals(string other)
Parameters
A string to compare for equality.
Returns
Type | Description |
|---|---|
| bool | True if this string and the other have the same length and all the same characters. |
Equals(FixedString32Bytes)
Returns true if this string and another string are equal.
public bool Equals(FixedString32Bytes other)
Parameters
A FixedString32Bytes to compare for equality.
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 string are equal.
public bool Equals(FixedString64Bytes other)
Parameters
A FixedString64Bytes to compare for equality.
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 string are equal.
public bool Equals(FixedString128Bytes other)
Parameters
A FixedString128Bytes to compare for equality.
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 string are equal.
public bool Equals(FixedString512Bytes other)
Parameters
A FixedString512Bytes to compare for equality.
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 string are equal.
public bool Equals(FixedString4096Bytes other)
Parameters
A FixedString4096Bytes to compare for equality.
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 an object are equal.
[ExcludeFromBurstCompatTesting("Takes managed object")]public override bool Equals(object obj)
Parameters
An object to compare for equality.
Returns
Type | Description |
|---|---|
| bool | True if this string and the object are equal. |
Remarks
Returns false if the object is neither a System.String or a FixedString.
Two strings are equal if they have equal length and all their characters match.