audittool/test-lib/src/main/java/io/bdrc/audit/audittests/FileSequence.java
private String trailingDigits(String source, int maxTrailing) {
            int beginScan = source.length() -1;

            while((maxTrailing-- > 0) && (beginScan >= 0) && Character.isDigit(source.charAt(beginScan))) {
                beginScan--;
            }

            return source.substring(++beginScan);
        }
/**
         * Scan a string from the end to the beginning until either 'maxTrailing' digits are found, or a non-digit
         * is found. Returns the String of those digits.
         * @param source source string
         * @param maxTrailing maximum number to look back
         * @return the integer represented by up to the last 'maxTrailing' digits in the string. Stops when a non-digit
         */
Scan a string from the end to the beginning until either 'maxTrailing' digits are found, or a non-digit
is found. Returns the String of those digits.
@param source source string
@param maxTrailing maximum number to look back
@return the integer represented by up to the last 'maxTrailing' digits in the string. Stops when a non-digit
Scan a string from the end to the beginning until either ' maxTrailing ' digits are found or a non - digit is found . Returns the String of those digits . @param source source string @param maxTrailing maximum number to look back @return the integer represented by up to the last ' maxTrailing ' digits in the string . Stops when a non - digit
private String trailingDigits(String source, int maxTrailing) {
            int beginScan = source.length() -1;
            while((maxTrailing-- > 0) && (beginScan >= 0) && Character.isDigit(source.charAt(beginScan))) {
                beginScan--;
            }
            return source.substring(++beginScan);
        }
private String trailingDigits ( String source , int maxTrailing ) { int beginScan = source . length ( ) - 1 ; while ( ( maxTrailing -- > 0 ) && ( beginScan >= 0 ) && Character . isDigit ( source . charAt ( beginScan ) ) ) { beginScan -- ; } return source . substring ( ++ beginScan ) ; }
Scan a string from the end to the beginning until either 'maxTrailing' digits are found, or a non-digit
 is found.
Scan a string from the end to the beginning until either ' maxTrailing ' digits are found or a non - digit is found .