Struct UnsafeText
An unmanaged, mutable, resizable UTF-8 string.
Namespace: Unity.Collections.LowLevel .Unsafe
Assembly: solution.dll
Syntax
public struct UnsafeText : INativeDisposable, IUTF8Bytes, INativeList<byte>, IIndexable<byte>
Remarks
The string is always null-terminated, meaning a zero byte always immediately follows the last character.
Constructors
Name | Description |
---|---|
Unsafe |
Initializes and returns an instance of UnsafeText. |
Properties
Name | Description |
---|---|
Capacity | The current capacity in bytes of this string. |
Is |
Whether this string's character buffer has been allocated (and not yet deallocated). |
Is |
Reports whether container is empty. |
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. |
Dispose() | Releases all resources (memory). |
Dispose(Job |
Creates and schedules a job that will dispose this string. |
Element |
Returns a reference to the byte (not character) at an index. |
Get |
Returns a pointer to this string's character buffer. |
To |
Returns a managed string copy of this string. |
Try |
Attempt to set the length in bytes of this string. |