Skip to content

StringIterator

1 min read

Import: import system.text;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

StringIterator

Cursor produced by string.iterator().

public class StringIterator: Iterator<char>

iterator

So for (let c in s.chars()) uses the enumerator protocol on the cursor itself.

public fun iterator(): StringIterator

next

Yields the next UTF-16 code unit or None.

public fun next(): Option<char>