private static final int previousSpaceIndex ( CharSequence sb , int seek ) { seek -- ; while ( seek > 0 && ! StringUtil . isWhitespace ( sb . charAt ( seek ) ) ) { seek -- ; } if ( seek > 0 && StringUtil . isWhitespace ( sb . charAt ( seek ) ) ) { while ( seek > 0 && StringUtil . isWhitespace ( sb . charAt ( seek - 1 ) ) ) seek -- ; return seek ; } return 0 ; }
Finds the index of the nearest space before a specified index which is not itself preceded by a space .