public static int getDeepestWhiteSpaceLineStartAfter ( String script , int offset ) { if ( offset < 0 ) { return offset ; } int i = offset ; while ( true ) { int lineStartAfter = getWhiteSpaceLineStartAfter ( script , i ) ; if ( lineStartAfter == - 1 ) { return i ; } else { i = lineStartAfter ; } } }
Eats whitespace lines after the given offset until it finds a non - whitespace line and returns the start of the last whitespace line found or the initial value if none was .