File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 2727namespace i18n {
2828namespace phonenumbers {
2929
30+ // Parses the phone-context parameter of a phone number in RFC3966 format.
3031class PhoneContextParser {
3132 friend class PhoneNumberUtil ;
3233 friend class PhoneContextParserTest ;
@@ -45,6 +46,13 @@ class PhoneContextParser {
4546 std::shared_ptr<PhoneNumberRegExpsAndMappings> reg_exps,
4647 std::shared_ptr<PhoneNumberNormalizer> normalizer);
4748
49+ // Parses the phone-context parameter of a phone number in RFC3966 format.
50+ // If the phone-context parameter is not present, returns std::nullopt. If it
51+ // is present but invalid, returns an error status. If it is present and
52+ // valid, returns a PhoneContext object. This object contains the raw value of
53+ // the phone-context parameter. Additionally, if the phone-context is exactly
54+ // and only a + followed by a valid country code, it also contains the country
55+ // code.
4856 absl::StatusOr<std::optional<PhoneContextParser::PhoneContext>> Parse (
4957 absl::string_view phone_number);
5058
Original file line number Diff line number Diff line change 2323namespace i18n {
2424namespace phonenumbers {
2525
26+ // Util class to normalize phone numbers.
2627class PhoneNumberNormalizer {
2728 friend class AsYouTypeFormatter ;
2829 friend class PhoneContextParser ;
You can’t perform that action at this time.
0 commit comments