HashIter type

EXPERIMENTAL Hash iterator.

Direct parent types

Iter
Iterator. Parent type for all specific iterator types.
Direct subtypes: 8

Methods

Bool(i:HashIter) Source: autoload/globals/Iter.ngs:344
Check whether there are more pairs to iterate over.

Returns

Bool. true: next() will return next pair. false: next() will throw NoNext
init(i:HashIter, h:Hash) Source: autoload/globals/Iter.ngs:333
HashIter constructor.

Example

i = HashIter({"a": 1, "b": 2})
next(i:HashIter) Source: autoload/globals/Iter.ngs:348
Get next key-value of the hash iterated over.

Returns

Any
nextv(i:HashIter) Source: autoload/globals/Iter.ngs:352
Get next value of the hash iterated over. Same as next(i)[1]
peek(i:HashIter) Source: autoload/globals/Iter.ngs:357
Preview key-value of the next pair of the hash iterated over. Does not affect internal pointer which means it does not affect of value returned by next().

Returns

Any
Str(i:HashIter) Source: autoload/globals/Iter.ngs:340
Textual representation of HashIter.

Returns

Str