cpp/src/phonenumbers/phonenumberutil.cc
// Returns the region codes that matches the specific country calling code. In
// the case of no region code being found, region_codes will be left empty.
Returns the region codes that matches the specific country calling code. In
the case of no region code being found, region_codes will be left empty.
Returns the region codes that matches the specific country calling code . In the case of no region code being found region_codes will be left empty .
void PhoneNumberUtil::GetRegionCodesForCountryCallingCode(
    int country_calling_code,
    std::list<string>* region_codes) const {
  DCHECK(region_codes);
  IntRegionsPair target_pair;
  target_pair.first = country_calling_code;
  typedef std::vector<IntRegionsPair>::const_iterator ConstIterator;
  std::pair<ConstIterator, ConstIterator> range =
      std::equal_range(country_calling_code_to_region_code_map_->begin(),
                       country_calling_code_to_region_code_map_->end(),
                       target_pair, OrderByFirst());
  if (range.first != range.second) {
    region_codes->insert(region_codes->begin(),
                         range.first->second->begin(),
                         range.first->second->end());
  }
}
void PhoneNumberUtil :: GetRegionCodesForCountryCallingCode ( int country_calling_code , std :: list < string > * region_codes ) const { DCHECK ( region_codes ) ; IntRegionsPair target_pair ; target_pair . first = country_calling_code ; typedef std :: vector < IntRegionsPair > :: const_iterator ConstIterator ; std :: pair < ConstIterator , ConstIterator > range = std :: equal_range ( country_calling_code_to_region_code_map_ -> begin ( ) , country_calling_code_to_region_code_map_ -> end ( ) , target_pair , OrderByFirst ( ) ) ; if ( range . first != range . second ) { region_codes -> insert ( region_codes -> begin ( ) , range . first -> second -> begin ( ) , range . first -> second -> end ( ) ) ; } }
Returns the region codes that matches the specific country calling code.
Returns the region codes that matches the specific country calling code .
// Create a IntRegionsPair with the country_code passed in, and use it to // locate the pair with the same country_code in the sorted vector.