value · System

StringIterator<T>

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

The code units of a string, in order.

Tipo
value
Espacio de nombres
System
Ensamblado
System.Core
Acceso
public
Archivo fuente
String.ant

Parámetros de tipo

NombreRestricciones
Tuno de u8, u16, u32

Constructores

new(String<T> text)
#

Propiedades

T Current { get; }
#

read-only

Métodos

Next() : bool
#

Miembros privados e internos (2)

String<T> text
#

private

i32 index
#

private

Código fuente

StringIterator<T> en Antril, descompilado a partir de su 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