findWordStartOffset static method
Implementation
static int findWordStartOffset(String text, int offset) {
if (offset <= 0 || offset > text.length) return offset;
int start = offset;
while (start > 0 && !isWordBoundary(text[start - 1])) {
start--;
}
return start;
}