StringIteratorUnicode

haxe.iterators.StringIteratorUnicode (Class)

This iterator can be used to iterate across strings in a cross-platform way. It handles surrogate pairs on platforms that require it. On each iteration, it returns the next character code.

Note that this has different semantics than a standard for-loop over the String's length due to the fact that it deals with surrogate pairs.

Static Members

unicodeIterator(s: String): StringIteratorUnicode

Convenience function which can be used as a static extension.

Name Type
s String
Returns
StringIteratorUnicode

Instance Members

hasNext(): Bool

See Iterator.hasNext

Returns
Bool

See Iterator.next

Returns
Int

new(s: String): Void

Create a new StringIteratorUnicode over String s.

Name Type
s String

Private Members

offset: Int