value · System

SpanIterator<T>

public value SpanIterator<T>

The elements of a span, in order.

Kind
value
Namespace
System
Assembly
System.Core
Access
public
Source file
Span.ant

Type parameters

NameConstraints
Tany type

Constructors

new(Span<T> span)
#

Properties

T Current { get; }
#

read-only

Methods

Next() : bool
#

Private and internal members (2)

Span<T> span
#

private

i32 index
#

private

Source

SpanIterator<T> as Antril, decompiled from its Larva HIR.

System.SpanIterator.ant
// System.SpanIterator — System.Core (decompiled from Larva HIR)

into namespace System
{
	/// The elements of a span, in order.
	public value SpanIterator<T>
	{
		Span<T> span;
		i32 index;

		public:
			new(Span<T> span)
			{
				this.span = span;
				index = -1;
			}

			Next() : bool
			{
				index++;
				return index < span.Length;
			}

			T Current
			{
				get => span[index];
			}
	}
}
Esc