struct in Unity.Collections
Implements interfaces:IIndexable<T0>, INativeList<T0>, IUTF8Bytes
A read-only alias for the value of a NativeText. Does not have its own allocated storage.
| Property | Description |
|---|---|
| Capacity | The current capacity in bytes of this string. |
| IsEmpty | Whether this string has no characters. |
| Length | The current length in bytes of this string. |
| this[int] | The byte at an index. |
| Value | A copy of this string as a managed string. |
| Method | Description |
|---|---|
| Clear | Sets the length to 0. For a NativeText.Readonly this function does nothing, unless safety checks are enabled (in which case it throws). |
| CompareTo | Returns the lexicographical sort order of this string relative to another. |
| ElementAt | Returns a reference to the byte (not character) at an index. Unsupported by NativeText.ReadOnly. |
| Equals | Returns true if this string and another are equal. |
| GetEnumerator | Returns an enumerator for iterating over the characters of the NativeText. |
| GetHashCode | Returns a hash code of this string. |
| GetUnsafePtr | Returns a pointer to this string's character buffer. |
| ToString | Returns a managed string copy of this string. |
| TryResize | Attempt to set the length in bytes of this string. For NativeText.ReadOnly this function is a no-op and always returns false. |
| Operator | Description |
|---|---|
| operator != | Returns true if two strings are unequal. |
| operator == | Returns true if two strings are equal. |