Interface IUTF8Bytes
An interface for a sequence of UTF-8 encoded text.
Namespace: Unity.Collections
Syntax
public interface IUTF8Bytes
Properties
IsEmpty
Whether this IUTF8Bytes is empty.
Declaration
bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean | True if this IUTF8Bytes is empty. |
Methods
GetUnsafePtr()
Returns a pointer to the content of this IUTF8Bytes.
Declaration
byte *GetUnsafePtr()
Returns
Type | Description |
---|---|
Byte* | A pointer to the content of this IUTF8Bytes. |
Remarks
The pointer may point to stack memory.
TryResize(Int32, NativeArrayOptions)
Attempt to set the length in bytes of this IUTF8Bytes's content buffer.
Declaration
bool TryResize(int newLength, NativeArrayOptions clearOptions = NativeArrayOptions.ClearMemory)
Parameters
Type | Name | Description |
---|---|---|
Int32 | newLength | The new length in bytes of the IUTF8Bytes's content buffer. |
NativeArrayOptions | clearOptions | Whether any bytes added should be zeroed out. |
Returns
Type | Description |
---|---|
Boolean | True if the new length is valid. |