code: 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;
    }
docs: Finds the index of the nearest space before a specified index which is not
  itself preceded by a space.
  
  @param sb
  The string buffer which contains the text being examined.
  @param seek
  The index to begin searching from.
  @return The index which contains the nearest space.