public static int indexFrom ( String s , String chars ) { for ( int i = 0 ; i < s . length ( ) ; i ++ ) if ( chars . indexOf ( s . charAt ( i ) ) >= 0 ) return i ; return - 1 ; }
returns the next index of a character from the chars string