Direct Queries
RWUBreakSearch supports direct boundary queries using the
isBreak() method. This method returns
true if a given string position is a break. For example, this code tests whether there is a sentence break immediately to the left of the
12th code point in
str:
RWUString str;
RWUBreakSearch searcher(RWUBreakSearch::Sentence, str);
RWUConstStringIterator it = str.beginCodePointIterator();
it.advanceCodePoints(11);
if (searcher.isBreak(it)) {
// Do something here...
}