1
ICU 휴식 반복기를 사용하여 자르기를했습니다. the example, 그들은 모든 경계를 반복하려면 다음 코드를 사용하는 것이 좋습니다 :ICU의 BreakIterator에 대한 잘못된 설명서가 있습니까?
void listWordBoundaries(const UnicodeString& s) {
UErrorCode status = U_ZERO_ERROR;
BreakIterator* bi = BreakIterator::createWordInstance(Locale::getUS(), status);
bi->setText(s);
int32_t p = bi->first();
while (p != BreakIterator::DONE) {
printf("Boundary at position %d\n", p);
p = bi->next();
}
delete bi;
}
이 next()
실제로 반복자를 변경했다고 표시하기 위해 나타납니다. 그러나 documentation은 값을 반환하는 것만 효과가 있음을 나타냅니다. 이것은 단지 나쁜 문서의 예입니까? 특히, next()
실제로 돌연변이 있다면, last()
또한 돌연변이인지 알고 싶습니다.
.. 티켓이 수정되었습니다. –