Home
last modified time | relevance | path

Searched refs:PhoneNumberUtil (Results 1 – 25 of 48) sorted by relevance

12

/third_party/libphonenumber/javascript/i18n/phonenumbers/
Dphonenumberutil.js53 i18n.phonenumbers.PhoneNumberUtil = function() { class in i18n.phonenumbers
60 goog.addSingletonGetter(i18n.phonenumbers.PhoneNumberUtil);
92 i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_ = 1;
102 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ = 2;
113 i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_ = 17;
123 i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ = 3;
134 i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_ = 250;
144 i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ = 'ZZ';
155 i18n.phonenumbers.PhoneNumberUtil.COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_ = '3';
168 i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_ = {
[all …]
Dasyoutypeformatter.js122 this.phoneUtil_ = i18n.phonenumbers.PhoneNumberUtil.getInstance();
223 '^[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*' + '\\$1'
224 + '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*(\\$\\d'
225 + '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*)*$');
696 return i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN
699 i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN.test(nextChar));
740 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
958 '^(?:' + '\\' + i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + '|' +
973 i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
1010 if (i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ==
[all …]
Dphonenumberutil_test.js44 var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
439 i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
445 i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
591 i18n.phonenumbers.PhoneNumberUtil.convertAlphaCharactersInNumber(input));
601 i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
611 i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
621 i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
627 i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
637 i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(inputNumber));
648 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
[all …]
Dshortnumberinfo.js547 var possibleNumber = i18n.phonenumbers.PhoneNumberUtil
549 if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
558 var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil
565 var result = i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
569 i18n.phonenumbers.PhoneNumberUtil
706 return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
/third_party/libphonenumber/cpp/test/phonenumbers/
Dphonenumberutil_test.cc53 PhoneNumberUtilTest() : phone_util_(*PhoneNumberUtil::GetInstance()) { in PhoneNumberUtilTest()
54 PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger()); in PhoneNumberUtilTest()
99 PhoneNumberUtil::ErrorType MaybeExtractCountryCode( in MaybeExtractCountryCode()
114 const PhoneNumberUtil& phone_util_;
138 EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR, in TEST_F()
150 EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER, in TEST_F()
200 std::set<PhoneNumberUtil::PhoneNumberType> types; in TEST_F()
202 EXPECT_NE(types.find(PhoneNumberUtil::FIXED_LINE), types.end()); in TEST_F()
204 EXPECT_EQ(types.find(PhoneNumberUtil::MOBILE), types.end()); in TEST_F()
206 EXPECT_EQ(types.find(PhoneNumberUtil::UNKNOWN), types.end()); in TEST_F()
[all …]
/third_party/libphonenumber/cpp/src/phonenumbers/
Dphonenumberutil.cc57 const size_t PhoneNumberUtil::kMinLengthForNsn;
58 const size_t PhoneNumberUtil::kMaxLengthForNsn;
59 const size_t PhoneNumberUtil::kMaxLengthCountryCode;
60 const int PhoneNumberUtil::kNanpaCountryCode;
63 const char PhoneNumberUtil::kPlusChars[] = "+\xEF\xBC\x8B"; /* "++" */
77 const char PhoneNumberUtil::kValidPunctuation[] =
84 const char PhoneNumberUtil::kCaptureUpToSecondNumberStart[] = "(.*)[\\\\/] *x";
87 const char PhoneNumberUtil::kRegionCodeForNonGeoEntity[] = "001";
138 PhoneNumberUtil::PhoneNumberType type) { in GetNumberDescByType()
140 case PhoneNumberUtil::PREMIUM_RATE: in GetNumberDescByType()
[all …]
Dphonenumbermatcher.h47 class PhoneNumberUtil; variable
77 PhoneNumberMatcher(const PhoneNumberUtil& util,
139 ResultCallback4<bool, const PhoneNumberUtil&, const PhoneNumber&,
158 const PhoneNumberUtil& util,
170 const PhoneNumberUtil& util);
185 const PhoneNumberUtil& phone_util_;
Dphonenumbermatcher.cc81 const PhoneNumberUtil& util) { in ContainsOnlyValidXChars()
101 != PhoneNumberUtil::NSN_MATCH) { in ContainsOnlyValidXChars()
118 const PhoneNumberUtil& util, in AllNumberGroupsRemainGrouped()
283 digit_block_limit_(PhoneNumberUtil::kMaxLengthForNsn + in PhoneNumberMatcherRegExps()
284 PhoneNumberUtil::kMaxLengthCountryCode), in PhoneNumberMatcherRegExps()
286 punctuation_(StrCat("[", PhoneNumberUtil::kValidPunctuation, "]", in PhoneNumberMatcherRegExps()
289 lead_class_chars_(StrCat(opening_parens_, PhoneNumberUtil::kPlusChars)), in PhoneNumberMatcherRegExps()
317 PhoneNumberUtil::kCaptureUpToSecondNumberStart)), in PhoneNumberMatcherRegExps()
325 PhoneNumberUtil::GetInstance()->GetExtnPatternsForMatching(), in PhoneNumberMatcherRegExps()
396 PhoneNumberMatcher::PhoneNumberMatcher(const PhoneNumberUtil& util, in PhoneNumberMatcher()
[all …]
Dphonenumberutil.h55 class PhoneNumberUtil : public Singleton<PhoneNumberUtil> {
65 friend class Singleton<PhoneNumberUtil>;
68 ~PhoneNumberUtil();
220 static PhoneNumberUtil* GetInstance();
757 PhoneNumberUtil::PhoneNumberType GetNumberTypeHelper(
821 PhoneNumberUtil();
876 PhoneNumberUtil::PhoneNumberFormat number_format,
883 PhoneNumberUtil::PhoneNumberFormat number_format,
964 DISALLOW_COPY_AND_ASSIGN(PhoneNumberUtil);
Dasyoutypeformatter.h51 class PhoneNumberUtil; variable
200 const PhoneNumberUtil& phone_util_;
231 friend class PhoneNumberUtil; variable
/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/
DPhoneNumberMatcher.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil.Leniency;
20 import com.google.i18n.phonenumbers.PhoneNumberUtil.MatchType;
21 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
155 PhoneNumberUtil.MAX_LENGTH_FOR_NSN + PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE;
161 String punctuation = "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]" + punctuationLimit;
165 String leadClassChars = openingParens + PhoneNumberUtil.PLUS_CHARS;
173 + "(?:" + PhoneNumberUtil.EXTN_PATTERNS_FOR_MATCHING + ")?",
174 PhoneNumberUtil.REGEX_FLAGS);
191 private final PhoneNumberUtil phoneUtil;
232 PhoneNumberMatcher(PhoneNumberUtil util, CharSequence text, String country, Leniency leniency, in PhoneNumberMatcher()
[all …]
DAsYouTypeFormatter.java58 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
76 Pattern.compile("[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*"
77 + "\\$1" + "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*(\\$\\d"
78 + "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*)*");
178 && PhoneNumberUtil.formattingRuleHasFirstGroupOnly( in getAvailableFormats()
189 && !PhoneNumberUtil.formattingRuleHasFirstGroupOnly( in getAvailableFormats()
416 && PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(Character.toString(nextChar)).matches()); in isDigitOrLeadingPlusSign()
438 String formattedNumberDigitsOnly = PhoneNumberUtil.normalizeDiallableCharsOnly(fullOutput); in attemptToFormatAccruedDigits()
576 regexCache.getPatternForRegex("\\" + PhoneNumberUtil.PLUS_SIGN + "|" in attemptToExtractIdd()
587 if (accruedInputWithoutFormatting.charAt(0) != PhoneNumberUtil.PLUS_SIGN) { in attemptToExtractIdd()
[all …]
/third_party/libphonenumber/cpp/test/phonenumbers/geocoding/
Dgeocoding_test_program.cc28 using i18n::phonenumbers::PhoneNumberUtil;
32 const PhoneNumberUtil& phone_util = *PhoneNumberUtil::GetInstance(); in main()
33 const PhoneNumberUtil::ErrorType status = phone_util.Parse( in main()
35 CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR); in main()
/third_party/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/
DPhoneNumberUtilTest.java21 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
22 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
23 import com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
129 private final PhoneNumberUtil phoneNumberUtilWithMissingMetadata =
130 new PhoneNumberUtil(mockedMetadataSource,
366 assertEquals("9", PhoneNumberUtil.getCountryMobileToken(phoneUtil.getCountryCodeForRegion( in testGetCountryMobileToken()
370 assertEquals("", PhoneNumberUtil.getCountryMobileToken(phoneUtil.getCountryCodeForRegion( in testGetCountryMobileToken()
445 assertEquals(expectedOutput, PhoneNumberUtil.convertAlphaCharactersInNumber(input)); in testConvertAlphaCharactersInNumber()
452 expectedOutput, PhoneNumberUtil.normalize(inputNumber).toString()); in testNormaliseRemovePunctuation()
459 expectedOutput, PhoneNumberUtil.normalize(inputNumber).toString()); in testNormaliseReplaceAlphaCharacters()
[all …]
DTestMetadataTestCase.java46 protected final PhoneNumberUtil phoneUtil;
49 phoneUtil = new PhoneNumberUtil( in TestMetadataTestCase()
59 PhoneNumberUtil.setInstance(phoneUtil); in setUp()
64 PhoneNumberUtil.setInstance(null); in tearDown()
DExampleNumbersTest.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
40 private final PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
195 for (PhoneNumberUtil.PhoneNumberType type : PhoneNumberUtil.PhoneNumberType.values()) { in testEveryTypeHasAnExampleNumber()
/third_party/libphonenumber/cpp/src/phonenumbers/geocoding/
Dgeocoding_warpper.cc15 using i18n::phonenumbers::PhoneNumberUtil;
24 util = PhoneNumberUtil::GetInstance(); in exposeLocationName()
29 PhoneNumberUtil::ErrorType type = util->Parse(number, uLocale.getCountry(), &phoneNumber); in exposeLocationName()
30 if (type != PhoneNumberUtil::ErrorType::NO_PARSING_ERROR) { in exposeLocationName()
Dphonenumber_offline_geocoder.cc68 phone_util_ = PhoneNumberUtil::GetInstance(); in Init()
127 PhoneNumberUtil::kRegionCodeForNonGeoEntity) == 0) { in GetRegionDisplayName()
164 PhoneNumberUtil::PhoneNumberType number_type = in GetDescriptionForNumber()
166 if (number_type == PhoneNumberUtil::UNKNOWN) { in GetDescriptionForNumber()
178 PhoneNumberUtil::PhoneNumberType number_type = in GetDescriptionForNumber()
180 if (number_type == PhoneNumberUtil::UNKNOWN) { in GetDescriptionForNumber()
Darea_code_map.h34 class PhoneNumberUtil; variable
66 const PhoneNumberUtil& phone_util_;
/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/
DPhoneNumberOfflineGeocoder.java20 import com.google.i18n.phonenumbers.PhoneNumberUtil;
21 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
38 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
92 || regionCode.equals(PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY)) in getRegionDisplayName()
118 String mobileToken = PhoneNumberUtil.getCountryMobileToken(number.getCountryCode()); in getDescriptionForValidNumber()
/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/
DPhoneNumberToCarrierMapper.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
34 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/
DPhoneNumberToTimeZonesMapper.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
137 PhoneNumberType numberType = PhoneNumberUtil.getInstance().getNumberType(number); in getTimeZonesForNumber()
140 } else if (!PhoneNumberUtil.getInstance().isNumberGeographical( in getTimeZonesForNumber()
/third_party/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/
DPhonePrefixMap.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil;
39 private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
DPrefixTimeZonesMap.java19 import com.google.i18n.phonenumbers.PhoneNumberUtil;
92 + PhoneNumberUtil.getInstance().getNationalSignificantNumber(number)); in lookupTimeZonesForNumber()
/third_party/libphonenumber/java/demo/src/com/google/phonenumbers/
DPhoneNumberParserServlet.java28 import com.google.i18n.phonenumbers.PhoneNumberUtil;
29 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
30 import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
31 import com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
60 private PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();

12