next

abstract fun next(n: Int): Int

Returns the nth boundary from the current boundary. If either the first or last text boundary has been reached, it returns BreakIterator.DONE and the current position is set to either the first or last text boundary depending on which one is reached. Otherwise, the iterator's current position is set to the new boundary. For example, if the iterator's current position is the mth text boundary and three more boundaries exist from the current boundary to the last text boundary, the next(2) call will return m + 2. The new text position is set to the (m + 2)th text boundary. A next(4) call would return BreakIterator.DONE and the last text boundary would become the new text position.

Return

The character index of the nth boundary from the current position or BreakIterator.DONE if either first or last text boundary has been reached.

Parameters

n

which boundary to return. A value of 0 does nothing. Negative values move to previous boundaries and positive values move to later boundaries.


abstract fun next(): Int

Returns the boundary following the current boundary. If the current boundary is the last text boundary, it returns BreakIterator.DONE and the iterator's current position is unchanged. Otherwise, the iterator's current position is set to the boundary following the current boundary.

Return

The character index of the next text boundary or BreakIterator.DONE if the current boundary is the last text boundary. Equivalent to next(1).

See also

.next