Parses the string passed in phone_number
.
Note that no validation is performed whether the recognized phone number is valid for a particular region.
The two-letter country code passed in region_code
only is used if the phone_number
is not written in
international format. The application's default region as returned by
phone_number_get_default_region is used if region_code
is null
.
If the number is guaranteed to start with a '+' followed by the country calling code, then "ZZ" can be passed for region_code
.
phone_number |
the phone number to parse |
region_code |
a two-letter country code, or |
a new PhoneNumber instance on success, or |