ByteIterator
ByteIterator: ByteIterator, hasValue, value, increment, print, toList, sum, iterator
struct ByteIterator: Iterator<uint8>, Printable
Iterates over the bytes of a string.
ByteIterator
ByteIterator(string stream)Initializes an iterator over the given string.
hasValue
bool hasValue()Returns true if there are more bytes.
value
uint8 value()Returns the current byte.
increment
void increment()Advances to the next byte.
void print(OutputStream& stream)Prints the remaining values in list form, e.g. [1, 2, 3].
toList
List<uint8> toList()Collects the remaining bytes into a list.
sum
uint8 sum()Returns the sum of the remaining bytes, or zero if there are none.
iterator
ByteIterator iterator()Returns itself.