Interface IUTF8Bytes
Interface marking this type as a run of UTF-8 encoded text.
Namespace: Unity.Collections
Syntax
public interface IUTF8Bytes
Properties
IsEmpty
Returns true if this IUTF8Bytes is empty.
Declaration
bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetUnsafePtr()
Returns an unsafe byte pointer to the bytes in this IUTF8Bytes. Special care must be taken with the lifettime of this pointer, as it may point to stack memory.
Declaration
byte *GetUnsafePtr()
Returns
Type | Description |
---|---|
Byte* |
TryResize(Int32, NativeArrayOptions)
Attempt to set the size of the underlying buffer.
Declaration
bool TryResize(int newLength, NativeArrayOptions clearOptions = NativeArrayOptions.ClearMemory)
Parameters
Type | Name | Description |
---|---|---|
Int32 | newLength | The new length of the string |
NativeArrayOptions | clearOptions | Whether the new memory should be initialized or not. |
Returns
Type | Description |
---|---|
Boolean | Whether the resize was successful. |