Struct NativeText.Enumerator
An enumerator over the characters (not bytes) of a NativeText.
Namespace: Unity.Collections
Assembly: Unity.Collections.dll
Syntax
public struct NativeText.Enumerator
Remarks
In an enumerator's initial state, its index is invalid. The first MoveNext() call advances the enumerator's index to the first character.
Constructors
Enumerator(NativeText)
Initializes and returns an instance of NativeText.Enumerator.
Declaration
public Enumerator(NativeText source)
Parameters
Type | Name | Description |
---|---|---|
NativeText | source | A NativeText for which to create an enumerator. |
Enumerator(ReadOnly)
Initializes and returns an instance of NativeText.Enumerator.
Declaration
public Enumerator(NativeText.ReadOnly source)
Parameters
Type | Name | Description |
---|---|---|
NativeText.ReadOnly | source | A NativeText.ReadOnly for which to create an enumerator. |
Properties
Current
The current character.
Declaration
public Unicode.Rune Current { get; }
Property Value
Type | Description |
---|---|
Unicode.Rune | The current character. |
Methods
Dispose()
Does nothing.
Declaration
public void Dispose()
MoveNext()
Advances the enumerator to the next character, returning true if Current is valid to read afterwards.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
bool | True if Current is valid to read after the call. |
Reset()
Resets the enumerator to its initial state.
Declaration
public void Reset()