diff --git a/cpp/src/phonenumbers/asyoutypeformatter.cc b/cpp/src/phonenumbers/asyoutypeformatter.cc index 1111fde65..beef03b29 100644 --- a/cpp/src/phonenumbers/asyoutypeformatter.cc +++ b/cpp/src/phonenumbers/asyoutypeformatter.cc @@ -469,8 +469,8 @@ bool AsYouTypeFormatter::AbleToExtractLongerNdd() { // extract a new NDD. national_number_.insert(0, national_prefix_extracted_); // Remove the previously extracted NDD from prefixBeforeNationalNumber. We - // cannot simply set it to empty string because people sometimes enter - // national prefix after country code, e.g +44 (0)20-1234-5678. + // cannot simply set it to empty string because people sometimes incorrectly + // enter national prefix after the country code, e.g. +44 (0)20-1234-5678. int index_of_previous_ndd = prefix_before_national_number_.find_last_of(national_prefix_extracted_); prefix_before_national_number_.resize(index_of_previous_ndd); diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java b/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java index c1ea69f7a..8cc31f5c0 100644 --- a/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java +++ b/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java @@ -397,8 +397,8 @@ public class AsYouTypeFormatter { // Put the extracted NDD back to the national number before attempting to extract a new NDD. nationalNumber.insert(0, nationalPrefixExtracted); // Remove the previously extracted NDD from prefixBeforeNationalNumber. We cannot simply set - // it to empty string because people sometimes enter national prefix after country code, e.g - // +44 (0)20-1234-5678. + // it to empty string because people sometimes incorrectly enter national prefix after the + // country code, e.g. +44 (0)20-1234-5678. int indexOfPreviousNdd = prefixBeforeNationalNumber.lastIndexOf(nationalPrefixExtracted); prefixBeforeNationalNumber.setLength(indexOfPreviousNdd); } diff --git a/javascript/i18n/phonenumbers/asyoutypeformatter.js b/javascript/i18n/phonenumbers/asyoutypeformatter.js index 52952a416..0d3672de5 100644 --- a/javascript/i18n/phonenumbers/asyoutypeformatter.js +++ b/javascript/i18n/phonenumbers/asyoutypeformatter.js @@ -687,8 +687,8 @@ i18n.phonenumbers.AsYouTypeFormatter.prototype.ableToExtractLongerNdd_ = this.nationalNumber_.append(this.nationalPrefixExtracted_); this.nationalNumber_.append(nationalNumberStr); // Remove the previously extracted NDD from prefixBeforeNationalNumber. We - // cannot simply set it to empty string because people sometimes enter - // national prefix after country code, e.g +44 (0)20-1234-5678. + // cannot simply set it to empty string because people sometimes incorrectly + // enter national prefix after the country code, e.g. +44 (0)20-1234-5678. /** @type {string} */ var prefixBeforeNationalNumberStr = this.prefixBeforeNationalNumber_.toString();