value · System

StringIterator<T>

public value StringIterator<T : [u8, u16, u32]>

The code units of a string, in order.

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

Type parameters

NameConstraints
Tone of u8, u16, u32

Constructors

new(String<T> text)
#

Properties

T Current { get; }
#

read-only

Methods

Next() : bool
#

Private and internal members (2)

String<T> text
#

private

i32 index
#

private

Source

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

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

into namespace System
{
	/// The code units of a string, in order.
	public value StringIterator<T : [u8, u16, u32]>
	{
		String<T> text;
		i32 index;

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

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

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