/* Print each element in reverse order: */ void printEachBackward( BreakIterator& boundary) { int32_t end = boundary.last(); for (int32_t start = boundary.previous(); start != BreakIterator::DONE; end = start, start = boundary.previous()) { printTextRange( boundary, start, end ); } }
/* Print the element at a specified position */ void printAt(BreakIterator &boundary, int32_t pos ) { int32_t end = boundary.following(pos); int32_t start = boundary.previous(); printTextRange( boundary, start, end ); }
/* Print the last element */ void printLast(BreakIterator& boundary) { int32_t end = boundary.last(); int32_t start = boundary.previous(); printTextRange( boundary, start, end ); }