public static int findLastOf ( String container , String charSeq , int begin ) { //find the last occurrence of one of characters in charSeq from begin backward for ( int i = begin ; i < container . length ( ) && i >= 0 ; -- i ) { if ( charSeq . contains ( "" + container . charAt ( i ) ) ) return i ; } return - 1 ; }
Find the last occurrence .