struct in Unity.Collections.LowLevel.Unsafe
Implements interfaces:IIndexable<T0>, INativeDisposable, INativeList<T0>, IUTF8Bytes
An unmanaged, mutable, resizable UTF-8 string.
The string is always null-terminated, meaning a zero byte always immediately follows the last character.
| Property | Description |
|---|---|
| MaxCapacity | The maximum number of elements this type of container can hold. |
| Property | Description |
|---|---|
| Capacity | The current capacity in bytes of this string. |
| IsCreated | Whether this string's character buffer has been allocated (and not yet deallocated). |
| IsEmpty | Reports whether container is empty. |
| Length | The current length in bytes of this string. |
| this[int] | The byte at an index. |
| Constructor | Description |
|---|---|
| UnsafeText | Initializes and returns an instance of UnsafeText. |
| Method | Description |
|---|---|
| Clear | Sets the length to 0. |
| Dispose | Releases all resources (memory). |
| ElementAt | Returns a reference to the byte (not character) at an index. |
| 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. |