Struct NativeText.Enumerator
An enumerator over the characters (not bytes) of a NativeText.
Namespace: Unity.Collections
Syntax
public struct Enumerator : IEnumerator<Unicode.Rune>, IDisposable, IEnumerator
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(NativeText.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 readonly 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 |
---|---|
Boolean | True if Current is valid to read after the call. |
Reset()
Resets the enumerator to its initial state.
Declaration
public void Reset()