cpp/src/phonenumbers/phonenumberutil.cc
// Returns a new phone number containing only the fields needed to uniquely
// identify a phone number, rather than any fields that capture the context in
// which the phone number was created.
// These fields correspond to those set in Parse() rather than
// ParseAndKeepRawInput().
Returns a new phone number containing only the fields needed to uniquely
identify a phone number, rather than any fields that capture the context in
which the phone number was created.
These fields correspond to those set in Parse() rather than
ParseAndKeepRawInput().
Returns a new phone number containing only the fields needed to uniquely identify a phone number rather than any fields that capture the context in which the phone number was created . These fields correspond to those set in Parse () rather than ParseAndKeepRawInput () .
void CopyCoreFieldsOnly(const PhoneNumber& number, PhoneNumber* pruned_number) {
  pruned_number->set_country_code(number.country_code());
  pruned_number->set_national_number(number.national_number());
  if (!number.extension().empty()) {
    pruned_number->set_extension(number.extension());
  }
  if (number.italian_leading_zero()) {
    pruned_number->set_italian_leading_zero(true);
    pruned_number->set_number_of_leading_zeros(
        number.number_of_leading_zeros());
  }
}
void CopyCoreFieldsOnly ( const PhoneNumber & number , PhoneNumber * pruned_number ) { pruned_number -> set_country_code ( number . country_code ( ) ) ; pruned_number -> set_national_number ( number . national_number ( ) ) ; if ( ! number . extension ( ) . empty ( ) ) { pruned_number -> set_extension ( number . extension ( ) ) ; } if ( number . italian_leading_zero ( ) ) { pruned_number -> set_italian_leading_zero ( true ) ; pruned_number -> set_number_of_leading_zeros ( number . number_of_leading_zeros ( ) ) ; } }
Returns a new phone number containing only the fields needed to uniquely
identify a phone number, rather than any fields that capture the context in
which the phone number was created.
Returns a new phone number containing only the fields needed to uniquely identify a phone number rather than any fields that capture the context in which the phone number was created .
// This field is only relevant if there are leading zeros at all.