Build a mapping from a country calling code to the region codes which denote the country/region represented by that country code.
Returns true if the given number, exactly as dialed, might be used to connect to an emergency service in the given region.
Converts all alpha characters in a number to their respective digits on a keypad, but retains existing formatting.
Formats a phone number in the specified format using default rules.
FormatByPattern formats a phone number in the specified format using client-defined formatting rules.
Formats a phone number using the original phone number format that the number is parsed from.
Formats a phone number in national format for dialing using the carrier as specified in the carrierCode.
Formats a phone number in national format for dialing using the carrier as specified in the preferredDomesticCarrierCode field of the PhoneNumber object passed in.
Returns a number formatted in such a way that it can be dialed from a mobile phone in a specific region.
Formats a phone number for out-of-country dialing purposes.
Formats a phone number for out-of-country dialing purposes.
Same as Format(PhoneNumber, PhoneNumberFormat), but accepts a mutable StringBuilder as a parameter to decrease object creation when invoked many times.
GetCarrierForNumber returns the carrier we believe the number belongs to.
GetCarrierWithPrefixForNumber returns the carrier we believe the number belongs to, as well as its prefix.
Returns the country calling code for a specific region.
Returns the mobile token for the provided country calling code if it has one, otherwise returns an empty string.
Gets a valid number for the specified region.
Gets a valid number for the specified country calling code for a non-geographical entity.
Gets a valid number for the specified region and number type.
GetGeocodingForNumber returns the location we think the number was first acquired in.
Gets the length of the geographical area code from the PhoneNumber object passed in, so that clients could use it to split a national significant number into geographical area code and subscriber number.
Gets the length of the national destination code (NDC) from the PhoneNumber object passed in, so that clients could use it to split a national significant number into NDC and subscriber number.
Gets the national significant number of the a phone number.
Returns the national dialling prefix for a specific region.
Gets the type of a phone number.
Returns the region code that matches the specific country calling code.
Returns the region where a phone number is from.
Returns a list with the region codes that match the specific country calling code.
GetSafeCarrierDisplayNameForNumber Gets the name of the carrier for the given phone number only when it is 'safe' to display to users.
GetSupportedCallingCodes returns all country calling codes the library has metadata for, covering both non-geographical entities (global network calling codes) and those used for geographical entities.
GetSupportedGlobalNetworkCallingCodes returns all global network calling codes the library has metadata for.
GetSupportedRegions returns all regions the library has metadata for.
GetTimezonesForNumber returns the names of timezones which we believe maps to the passed in number.
GetTimezonesForPrefix returns a slice of Timezones corresponding to the number passed or error when it is impossible to convert the string to int The algorythm tries to match the timezones starting from the maximum number of phone number digits and decreasing until it finds one or reaches 0.
Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT.
Returns true if the given number exactly matches an emergency service number in the given region.
Returns true if the supplied region supports mobile number portability.
Checks if this is a region under the North American Numbering Plan Administration (NANPA).
Takes two phone numbers as strings and compares them for equality.
Takes two phone numbers and compares them for equality.
Takes two phone numbers and compares them for equality.
Convenience wrapper around IsPossibleNumberWithReason().
Check whether a phone number is a possible number.
Check whether a short number is a possible number.
Check whether a short number is a possible number when dialed from the given region.
Tests whether a phone number matches a valid pattern.
Tests whether a phone number is valid for a certain region.
Tests whether a short number matches a valid pattern.
Tests whether a short number matches a valid pattern in a region.
Returns whether the given national number (a string containing only decimal digits) matches the national number pattern defined in the given PhoneNumberDesc message.
MaybeSeparateExtensionFromPhone will extract any extension (as in, the part of the number dialled after the call is connected, usually indicated with extn, ext, x or similar) from the end of the number and returns it along with the proceeding phone number.
NewBuilder creates and initializes a new Buffer using buf as its initial contents.
NewBuilderString creates and initializes a new Buffer using string s as its initial contents.
Normalizes a string of characters representing a phone number.
Parses a string and returns it in proto buffer format.
Parses a string and returns it in proto buffer format.
Same as ParseAndKeepRawInput(String, String), but accepts a mutable PhoneNumber as a parameter to decrease object creation when invoked many times.
Same as Parse(string, string), but accepts mutable PhoneNumber as a parameter to decrease object creation when invoked many times.
Attempts to extract a valid number from a phone number that is too long to be valid, and resets the PhoneNumber object passed in to that valid version.