code: private static int findStart( char[] buffer, int start, int end )
      {
          int pos, cp;
          for ( pos = start; pos < end && isWhitespace( cp = codePointAt( buffer, pos ) ); pos += charCount( cp ) )
          {
              if ( cp == '\n' )
              {
                  start = pos + 1;
              }
          }
          return pos >= end ? end : start;
      }
docs: Find the beginning of the first line that isn't all whitespace.