public static int getWhiteSpaceOrCommentLineStartAfter( String script, int end )
  {
    int endLine = getLineEnd( script, end );
    if( endLine < script.length() - 1 )
    {
      int nextLineStart = endLine + 1;
      int nextLineEnd = getLineEnd( script, nextLineStart );
      String line = script.substring( nextLineStart, nextLineEnd );
      boolean whitespace = GosuStringUtil.isWhitespace( line ) || line.trim().startsWith( "//" );
      if( whitespace )
      {
        return nextLineStart;
      }
    }
    return -1;
  }
public static int getWhiteSpaceOrCommentLineStartAfter ( String script , int end ) { int endLine = getLineEnd ( script , end ) ; if ( endLine < script . length ( ) - 1 ) { int nextLineStart = endLine + 1 ; int nextLineEnd = getLineEnd ( script , nextLineStart ) ; String line = script . substring ( nextLineStart , nextLineEnd ) ; boolean whitespace = GosuStringUtil . isWhitespace ( line ) || line . trim ( ) . startsWith ( "//" ) ; if ( whitespace ) { return nextLineStart ; } } return - 1 ; }
Returns the start of the next line if that line is only whitespace.  Returns -1 otherwise.