Struct NativeText
An unmanaged, mutable, resizable UTF-8 string.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[NativeContainer]
public struct NativeText : INativeList<byte>, IIndexable<byte>, INativeDisposable, IUTF8Bytes
Remarks
The string is always null-terminated, meaning a zero byte always immediately follows the last character.
Constructors
Name | Description |
---|---|
Native |
Initializes and returns an instance of NativeText. |
Native |
Initializes and returns an instance of NativeText. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with an initial capacity of 512 bytes. |
Native |
Initializes and returns an instance of NativeText with an initial capacity of 512 bytes. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
Native |
Initializes and returns an instance of NativeText with the characters copied from another string. |
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 |
Whether this string has no characters. |
this[int] | The byte at an index. Note that writing to a NativeText.Readonly is not supported; the setter of this property throws when safety checks are enabled. |
Length | The current length in bytes of this string. |
Methods
Name | Description |
---|---|
Add(in byte) | Appends a byte. |
As |
Returns a readonly version of this NativeText instance. |
Clear() | Sets the length to 0. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Compare |
Returns the lexicographical sort order of this string relative to another. |
Dispose() | Releases all resources (memory and safety handles). |
Dispose(Job |
Creates and schedules a job that releases all resources (memory and safety handles) of this NativeText. |
Element |
Returns a reference to the byte (not character) at an index. |
Equals(object) | Returns true if this string and another object are equal. |
Equals(string) | Returns true if this string and another are equal. |
Equals(Fixed |
Returns true if this string and another are equal. |
Equals(Fixed |
Returns true if this string and another are equal. |
Equals(Fixed |
Returns true if this string and another are equal. |
Equals(Fixed |
Returns true if this string and another are equal. |
Equals(Fixed |
Returns true if this string and another are equal. |
Equals(Native |
Returns true if this string and another are equal. |
Equals(Read |
Returns true if this string and another are equal. |
Get |
Returns an enumerator for iterating over the characters of the NativeText. |
Get |
Returns a hash code of this string. |
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. |
Operators
Name | Description |
---|---|
operator ==(in Native |
Returns true if two strings are equal. |
operator ==(in Native |
Returns true if two strings are equal. |
operator ==(in Native |
Returns true if two strings are equal. |
operator ==(in Native |
Returns true if two strings are equal. |
operator ==(in Native |
Returns true if two strings are equal. |
operator !=(in Native |
Returns true if two strings are unequal. |
operator !=(in Native |
Returns true if two strings are unequal. |
operator !=(in Native |
Returns true if two strings are unequal. |
operator !=(in Native |
Returns true if two strings are unequal. |
operator !=(in Native |
Returns true if two strings are unequal. |