cpp/src/phonenumbers/phonenumberutil.cc
// A helper function that is used by Format and FormatByPattern.
A helper function that is used by Format and FormatByPattern.
A helper function that is used by Format and FormatByPattern .
void PrefixNumberWithCountryCallingCode(
    int country_calling_code,
    PhoneNumberUtil::PhoneNumberFormat number_format,
    string* formatted_number) {
  switch (number_format) {
    case PhoneNumberUtil::E164:
      formatted_number->insert(0, StrCat(kPlusSign, country_calling_code));
      return;
    case PhoneNumberUtil::INTERNATIONAL:
      formatted_number->insert(0, StrCat(kPlusSign, country_calling_code, " "));
      return;
    case PhoneNumberUtil::RFC3966:
      formatted_number->insert(0, StrCat(kRfc3966Prefix, kPlusSign,
                                         country_calling_code, "-"));
      return;
    case PhoneNumberUtil::NATIONAL:
    default:
      return;
  }
}
void PrefixNumberWithCountryCallingCode ( int country_calling_code , PhoneNumberUtil :: PhoneNumberFormat number_format , string * formatted_number ) { switch ( number_format ) { case PhoneNumberUtil :: E164 : formatted_number -> insert ( 0 , StrCat ( kPlusSign , country_calling_code ) ) ; return ; case PhoneNumberUtil :: INTERNATIONAL : formatted_number -> insert ( 0 , StrCat ( kPlusSign , country_calling_code , " " ) ) ; return ; case PhoneNumberUtil :: RFC3966 : formatted_number -> insert ( 0 , StrCat ( kRfc3966Prefix , kPlusSign , country_calling_code , " " ) ) ; return ; case PhoneNumberUtil :: NATIONAL : default : return ; } }
A helper function that is used by Format and FormatByPattern.
A helper function that is used by Format and FormatByPattern .
// Do nothing.