Struct NativeText.ReadOnly
A read-only alias for the value of a NativeText. Does not have its own allocated storage.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[NativeContainer]
[NativeContainerIsReadOnly]
public struct NativeText.ReadOnly : INativeList<byte>, IIndexable<byte>, IUTF8Bytes
Properties
| Name | Description |
|---|---|
| Capacity | The current capacity in bytes of this string. |
| IsEmpty | Whether this string has no characters. |
| this[int] | The byte at an index. |
| Length | The current length in bytes of this string. |
Methods
| Name | 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(string) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(FixedString128Bytes) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(FixedString32Bytes) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(FixedString4096Bytes) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(FixedString512Bytes) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(FixedString64Bytes) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(NativeText) | Returns the lexicographical sort order of this string relative to another. |
| CompareTo(ReadOnly) | Returns the lexicographical sort order of this string relative to another. |
| ElementAt(int) | Returns a reference to the byte (not character) at an index. Unsupported by NativeText.ReadOnly. |
| Equals(object) | Returns true if this string and another object are equal. |
| Equals(string) | Returns true if this string and another are equal. |
| Equals(FixedString128Bytes) | Returns true if this string and another are equal. |
| Equals(FixedString32Bytes) | Returns true if this string and another are equal. |
| Equals(FixedString4096Bytes) | Returns true if this string and another are equal. |
| Equals(FixedString512Bytes) | Returns true if this string and another are equal. |
| Equals(FixedString64Bytes) | Returns true if this string and another are equal. |
| Equals(NativeText) | Returns true if this string and another are equal. |
| Equals(ReadOnly) | 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(int, NativeArrayOptions) | Attempt to set the length in bytes of this string. For NativeText.ReadOnly this function is a no-op and always returns false. |
Operators
| Name | Description |
|---|---|
| operator ==(in ReadOnly, in FixedString128Bytes) | Returns true if two strings are equal. |
| operator ==(in ReadOnly, in FixedString32Bytes) | Returns true if two strings are equal. |
| operator ==(in ReadOnly, in FixedString4096Bytes) | Returns true if two strings are equal. |
| operator ==(in ReadOnly, in FixedString512Bytes) | Returns true if two strings are equal. |
| operator ==(in ReadOnly, in FixedString64Bytes) | Returns true if two strings are equal. |
| operator !=(in ReadOnly, in FixedString128Bytes) | Returns true if two strings are unequal. |
| operator !=(in ReadOnly, in FixedString32Bytes) | Returns true if two strings are unequal. |
| operator !=(in ReadOnly, in FixedString4096Bytes) | Returns true if two strings are unequal. |
| operator !=(in ReadOnly, in FixedString512Bytes) | Returns true if two strings are unequal. |
| operator !=(in ReadOnly, in FixedString64Bytes) | Returns true if two strings are unequal. |