Lines Matching defs:extension

112 // Default extension prefix to use when formatting. This will be put in front of
113 // any extension component of the number, after the main national number is
114 // formatted. For example, if you wish the default extension formatting to be "
115 // extn: 3456", then you should specify " extn: " here as the default extension
220 // - There are currently six capturing groups for the extension itself. If this
223 // capture as part of the extension, or else parsing will fail!
225 // We cap the maximum length of an extension based on the ambiguity of the
226 // way the extension is prefixed. As per ITU, the officially allowed
229 // as the extension labels are not standardized.
240 // Here the extension is called out in a more explicit way, i.e mentioning it
246 // One-character symbols that can be used to indicate an extension, and less
247 // commonly used or more ambiguous extension labels.
251 // When extension is not separated clearly.
269 // The first regular expression covers RFC 3966 format, where the extension is
270 // added using ";ext=". The second more generic where extension is mentioned
272 // numbers in extension than any other extension labels. The third one
273 // captures when single character extension labels or less commonly used
274 // labels are present. In such cases we capture fewer extension digits in
276 // other as a number + extension. The fourth one covers the special case of
277 // American numbers where the extension is written with a hash at the end,
287 // ",," is commonly used for auto dialling the extension when connected.
289 // the extension number following.
292 // matching comma as extension label may have it.
305 // Here the first pattern is exclusive for extension autodialling formats
308 // commas that acts as extension labels, so we have strict cap on number of
498 if (!number.extension().empty()) {
499 pruned_number->set_extension(number.extension());
639 // alpha characters and digits in the phone number. Does not include extension
659 // matching. Here we allow "comma" and "semicolon" as possible extension
739 // extension. Note the capturing block at the start to capture the rest of the
752 // Regexp of all known extension prefixes used by different regions followed
756 // We append optionally the extension pattern to the end here, as a valid
757 // phone number may have an extension prefix appended, followed by 1 or more
1294 // Clear the extension, as that part cannot normally be dialed together with
1841 // Appends the formatted extension of a phone number, if the phone number had an
1842 // extension specified.
1849 if (number.has_extension() && number.extension().length() > 0) {
1851 StrAppend(formatted_number, kRfc3966ExtnPrefix, number.extension());
1855 number.extension());
1857 StrAppend(formatted_number, kDefaultExtnPrefix, number.extension());
2187 // This should include the national number, an optional extension or
2206 // extension won't appear at the same time with isdn-subaddress according to
2247 // Attempt to parse extension first, since it doesn't require country-specific
2249 string extension;
2250 MaybeStripExtension(&national_number, &extension);
2251 if (!extension.empty()) {
2252 temp_number.set_extension(extension);
2345 // second extension here makes this actually two phone numbers, (530) 583-6985
2346 // x302 and (530) 583-6985 x2303. We remove the second extension so that the
2661 // Clear the extension so it's not included when formatting.
2734 // Copy the number, since we are going to try and strip the extension from it.
2736 string extension;
2737 MaybeStripExtension(&number_copy, &extension);
2920 // Strips any extension (as in, the part of the number dialled after the call is
2923 bool PhoneNumberUtil::MaybeStripExtension(string* number, std::string* extension)
2926 DCHECK(extension);
2927 // There are six extension capturing groups in the regular expression.
2944 // If we find a potential extension, and the number preceding this is a
2945 // viable number, we assume it is an extension.
2953 extension->assign(possible_extension_one);
2955 extension->assign(possible_extension_two);
2957 extension->assign(possible_extension_three);
2959 extension->assign(possible_extension_four);
2961 extension->assign(possible_extension_five);
2963 extension->assign(possible_extension_six);
3097 first_number.extension() != second_number.extension()) {
3110 // absence of an extension, or one NSN being a shorter variant of the