private String appendNationalNumber(String nationalNumber){
  int prefixBeforeNationalNumberLength=prefixBeforeNationalNumber.length();
  if (shouldAddSpaceAfterNationalPrefix && prefixBeforeNationalNumberLength > 0 && prefixBeforeNationalNumber.charAt(prefixBeforeNationalNumberLength - 1) != SEPARATOR_BEFORE_NATIONAL_NUMBER) {
    return new String(prefixBeforeNationalNumber) + SEPARATOR_BEFORE_NATIONAL_NUMBER + nationalNumber;
  }
 else {
    return prefixBeforeNationalNumber + nationalNumber;
  }
}

private String appendNationalNumber ( String nationalNumber ) { int prefixBeforeNationalNumberLength = prefixBeforeNationalNumber . length ( ) ; if ( shouldAddSpaceAfterNationalPrefix && prefixBeforeNationalNumberLength > 0 && prefixBeforeNationalNumber . charAt ( prefixBeforeNationalNumberLength - 1 ) != SEPARATOR_BEFORE_NATIONAL_NUMBER ) { return new String ( prefixBeforeNationalNumber ) + SEPARATOR_BEFORE_NATIONAL_NUMBER + nationalNumber ; } else { return prefixBeforeNationalNumber + nationalNumber ; } }
combines the national number with any prefix ( idd / + and country code or national prefix ) that was collected . a space will be inserted between them if the current formatting template indicates this to be suitable .
