void findEndWordBoundary(StringView text, int position, int* end) { TextBreakIterator* it = wordBreakIterator(text); *end = textBreakFollowing(it, position); if (*end < 0) *end = textBreakLast(it); }
void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end) { TextBreakIterator* it = wordBreakIterator(chars, len); *end = textBreakFollowing(it, position); if (*end < 0) *end = textBreakLast(it); *start = textBreakPrevious(it); }