question: public static int indexOfIgnoreParentheses ( char c , String s , int start ) { int level = 0 ; for ( int i = start ; i < s . length ( ) ; i ++ ) { char other = s . charAt ( i ) ; if ( other == '(' ) { level ++ ; } else if ( other == ')' ) { level -- ; } else if ( other == c && level == 0 ) { return i ; } } return - 1 ; }
target:  Returns the position of the first occurrence of the given character found in s starting at start. Ignores text within pairs of parentheses. Returns -1 if no occurrence is found.