public static int lastIndexOf ( String input , char ch , int offset ) { for ( int i = input . length ( ) - 1 - offset ; i >= 0 ; i -- ) { if ( input . charAt ( i ) == ch ) { return i ; } } return - 1 ; }
Like a String . lastIndexOf but without MIN_SUPPLEMENTARY_CODE_POINT handling