question: public static int commentStart ( String line ) { boolean insidequote = false ; for ( int i = 0 ; i < line . length ( ) ; i ++ ) { char current = line . charAt ( i ) ; if ( current == '\'' ) { insidequote = ! insidequote ; } else if ( ! insidequote ) { if ( current == ';' ) { return i ; } } } return - 1 ; }
target:  returns the index inside the given string where a comment starts (usually the first ";")