cpp/src/phonenumbers/phonenumberutil.cc
// Checks to see that the region code used is valid, or if it is not valid, that
// the number to parse starts with a + symbol so that we can attempt to infer
// the country from the number. Returns false if it cannot use the region
// provided and the region cannot be inferred.
Checks to see that the region code used is valid, or if it is not valid, that
the number to parse starts with a + symbol so that we can attempt to infer
the country from the number. Returns false if it cannot use the region
provided and the region cannot be inferred.
Checks to see that the region code used is valid or if it is not valid that the number to parse starts with a + symbol so that we can attempt to infer the country from the number . Returns false if it cannot use the region provided and the region cannot be inferred .
bool PhoneNumberUtil::CheckRegionForParsing(
    const string& number_to_parse,
    const string& default_region) const {
  if (!IsValidRegionCode(default_region) && !number_to_parse.empty()) {
    const scoped_ptr<RegExpInput> number(
        reg_exps_->regexp_factory_->CreateInput(number_to_parse));
    if (!reg_exps_->plus_chars_pattern_->Consume(number.get())) {
      return false;
    }
  }
  return true;
}
bool PhoneNumberUtil :: CheckRegionForParsing ( const string & number_to_parse , const string & default_region ) const { if ( ! IsValidRegionCode ( default_region ) && ! number_to_parse . empty ( ) ) { const scoped_ptr < RegExpInput > number ( reg_exps_ -> regexp_factory_ -> CreateInput ( number_to_parse ) ) ; if ( ! reg_exps_ -> plus_chars_pattern_ -> Consume ( number . get ( ) ) ) { return false ; } } return true ; }
Checks to see that the region code used is valid, or if it is not valid, that
the number to parse starts with a + symbol so that we can attempt to infer
the country from the number.
Checks to see that the region code used is valid or if it is not valid that the number to parse starts with a + symbol so that we can attempt to infer the country from the number .