code: public static int getWhiteSpaceLineStartBefore( String script, int start )
    {
      int startLine = getLineStart( script, start );
      if( startLine > 0 )
      {
        int nextLineEnd = startLine - 1;
        int previousLineStart = getLineStart( script, nextLineEnd );
        boolean whitespace = GosuStringUtil.isWhitespace( script.substring( previousLineStart, nextLineEnd ) );
        if( whitespace )
        {
          return previousLineStart;
        }
      }
      return -1;
    }
docs: Returns the start of the previous line if that line is only whitespace.  Returns -1 otherwise.