cpp/src/phonenumbers/phonenumberutil.cc
// Normalizes a string of characters representing a phone number. This performs
// the following conversions:
//   - Punctuation is stripped.
//   For ALPHA/VANITY numbers:
//   - Letters are converted to their numeric representation on a telephone
//     keypad. The keypad used here is the one defined in ITU Recommendation
//     E.161. This is only done if there are 3 or more letters in the number, to
//     lessen the risk that such letters are typos.
//   For other numbers:
//   - Wide-ascii digits are converted to normal ASCII (European) digits.
//   - Arabic-Indic numerals are converted to European numerals.
//   - Spurious alpha characters are stripped.
Normalizes a string of characters representing a phone number. This performs
the following conversions:
Punctuation is stripped.
For ALPHA/VANITY numbers:
Letters are converted to their numeric representation on a telephone
keypad. The keypad used here is the one defined in ITU Recommendation
E.161. This is only done if there are 3 or more letters in the number, to
lessen the risk that such letters are typos.
For other numbers:
Wide-ascii digits are converted to normal ASCII (European) digits.
Arabic-Indic numerals are converted to European numerals.
Spurious alpha characters are stripped.
Normalizes a string of characters representing a phone number . This performs the following conversions : Punctuation is stripped . For ALPHA / VANITY numbers : Letters are converted to their numeric representation on a telephone keypad . The keypad used here is the one defined in ITU Recommendation E . 161 . This is only done if there are 3 or more letters in the number to lessen the risk that such letters are typos . For other numbers : Wide - ascii digits are converted to normal ASCII ( European ) digits . Arabic - Indic numerals are converted to European numerals . Spurious alpha characters are stripped .
void PhoneNumberUtil::Normalize(string* number) const {
  DCHECK(number);
  if (reg_exps_->valid_alpha_phone_pattern_->PartialMatch(*number)) {
    NormalizeHelper(reg_exps_->alpha_phone_mappings_, true, number);
  }
  NormalizeDigitsOnly(number);
}
void PhoneNumberUtil :: Normalize ( string * number ) const { DCHECK ( number ) ; if ( reg_exps_ -> valid_alpha_phone_pattern_ -> PartialMatch ( * number ) ) { NormalizeHelper ( reg_exps_ -> alpha_phone_mappings_ , true , number ) ; } NormalizeDigitsOnly ( number ) ; }
Normalizes a string of characters representing a phone number.
Normalizes a string of characters representing a phone number .