code: private int getStartingPoint(String buffer) {
      for (int i = 0; i < buffer.length(); i++) {
        if (!Character.isWhitespace(buffer.charAt(i))) {
          return i;
        }
      }
      return buffer.length();
    }
docs: Returns the index of the first non-whitespace character.
  
  @param buffer Input string
  @return index of the first non-whitespace character