value · System

ResourceIterator

public value ResourceIterator

loop (u8 b in data) over a ResourceData.

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

Constructors

new(u8* data, i32 length)
#

Properties

u8 Current { get; }
#

read-only

Methods

Next() : bool
#

Private and internal members (3)

u8* data
#

private

i32 length
#

private

i32 index
#

private

Source

ResourceIterator as Antril, decompiled from its Larva HIR.

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

into namespace System
{
	/// `loop (u8 b in data)` over a ResourceData.
	public value ResourceIterator
	{
		u8* data;
		i32 length;
		i32 index;

		public:
			new(u8* data, i32 length)
			{
				this.data = data;
				this.length = length;
				index = -1;
			}

			Next() : bool
			{
				index++;
				return index < length;
			}

			u8 Current
			{
				get
				{
					unsafe
					{
						return *(data + (i64)index);
					}
				}
			}
	}
}
Esc