private static String replaceLeadingZero(String generated) {
        if (generated.charAt(0) == '0') {
            // find number > 0 as replacement to avoid leading zero numbers
            int replacement = 0;
            while (replacement == 0) {
                replacement = generator.nextInt(10);
            }
            
            return replacement + generated.substring(1);
        } else {
            return generated;
        }
    }
private static String replaceLeadingZero ( String generated ) { if ( generated . charAt ( 0 ) == '0' ) { int replacement = 0 ; while ( replacement == 0 ) { replacement = generator . nextInt ( 10 ) ; } return replacement + generated . substring ( 1 ) ; } else { return generated ; } }
Replaces first leading zero number if present.
@param generated
@return