Home
last modified time | relevance | path

Searched refs:collator (Results 1 – 25 of 40) sorted by relevance

12

/external/apache-harmony/text/src/test/java/org/apache/harmony/text/tests/java/text/
DCollationKeyTest.java31 Collator collator = Collator.getInstance(); in test_compareToLjava_text_CollationKey() local
32 collator.setStrength(Collator.PRIMARY); in test_compareToLjava_text_CollationKey()
33 CollationKey key1 = collator.getCollationKey("abc"); in test_compareToLjava_text_CollationKey()
34 CollationKey key2 = collator.getCollationKey("ABC"); in test_compareToLjava_text_CollationKey()
44 Collator collator = Collator.getInstance(); in test_compareToLjava_lang_Object() local
45 collator.setStrength(Collator.PRIMARY); in test_compareToLjava_lang_Object()
46 CollationKey key1 = collator.getCollationKey("abc"); in test_compareToLjava_lang_Object()
47 CollationKey key2 = collator.getCollationKey("ABC"); in test_compareToLjava_lang_Object()
55 Collator collator = Collator.getInstance(); in test_equalsLjava_lang_Object() local
56 collator.setStrength(Collator.PRIMARY); in test_equalsLjava_lang_Object()
[all …]
DCollatorTest.java207 RuleBasedCollator collator; in failing_test_getDecomposition() local
209 collator = new RuleBasedCollator("; \u0300 < a, A < b < c < d"); in failing_test_getDecomposition()
215 collator.getDecomposition() == Collator.CANONICAL_DECOMPOSITION); in failing_test_getDecomposition()
238 RuleBasedCollator collator; in test_getStrength() local
240 collator = new RuleBasedCollator("; \u0300 < a, A < b < c < d"); in test_getStrength()
245 assertTrue("Wrong default", collator.getStrength() == Collator.TERTIARY); in test_getStrength()
/external/icu4c/samples/coll/
Dcoll.cpp54 UCollator * collator = 0; variable
143 UCollationResult result = ucol_strcoll(collator, source, -1, target, -1); in strcmp()
164 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
168 collator = ucol_open(opt_locale, &status); in processCollator()
183 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
186 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
189 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
193 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, in processCollator()
197 ucol_setAttribute(collator, UCOL_CASE_LEVEL, UCOL_ON, &status); in processCollator()
200 ucol_setAttribute(collator, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, in processCollator()
[all …]
Dreadme.txt2 coll: a sample program which compares 2 strings with a user-defined collator.
5 Creating a user-defined collator
6 Comparing 2 string using the collator created
/external/icu4c/samples/strsrch/
Dstrsrch.cpp59 UCollator * collator = 0; variable
155 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
159 collator = ucol_open(opt_locale, &status); in processCollator()
174 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
177 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
180 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
184 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, in processCollator()
188 ucol_setAttribute(collator, UCOL_CASE_LEVEL, UCOL_ON, &status); in processCollator()
191 ucol_setAttribute(collator, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, in processCollator()
197 ucol_setAttribute(collator, UCOL_STRENGTH, UCOL_PRIMARY, &status); in processCollator()
[all …]
/external/sqlite/android/
Dsqlite3_android.cpp274 UCollator* collator; member
328 UCollator* collator = (UCollator*)sqlite3_user_data(context); in tokenize() local
411 uint32_t result = ucol_getSortKey(collator, token, -1, (uint8_t*)keybuf, sizeof(keybuf)-1); in tokenize()
454 static void localized_collator_dtor(UCollator* collator) in localized_collator_dtor() argument
456 ucol_close(collator); in localized_collator_dtor()
470 UCollator* collator = ucol_open(systemLocale, &status); in register_localized_collators() local
475 ucol_setAttribute(collator, UCOL_STRENGTH, UCOL_PRIMARY, &status); in register_localized_collators()
482 ucol_getShortDefinitionString(collator, NULL, buf, 1024, &status); in register_localized_collators()
485 err = sqlite3_create_collation_v2(handle, LOCALIZED_COLLATOR_NAME, SQLITE_UTF16, collator, in register_localized_collators()
488 err = sqlite3_create_collation_v2(handle, LOCALIZED_COLLATOR_NAME, SQLITE_UTF8, collator, in register_localized_collators()
[all …]
/external/icu4c/test/intltest/
Dsrchtest.cpp180 RuleBasedCollator * StringSearchTest::getCollator(const char *collator) in getCollator() argument
182 if (collator == NULL) { in getCollator()
185 if (strcmp(collator, "fr") == 0) { in getCollator()
188 else if (strcmp(collator, "de") == 0) { in getCollator()
191 else if (strcmp(collator, "es") == 0) { in getCollator()
464 Collator *collator = getCollator(search->collator); in assertEqual() local
486 collator->setStrength(getECollationStrength(search->strength)); in assertEqual()
487 strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator, in assertEqual()
495 collator->setStrength(getECollationStrength(UCOL_TERTIARY)); in assertEqual()
506 collator->setStrength(getECollationStrength(UCOL_TERTIARY)); in assertEqual()
[all …]
Dssearch.cpp292 LocalUCollatorPointer collator(ucol_open(clocale, &status)); in searchTest() local
293 ucol_setStrength(collator.getAlias(), collatorStrength); in searchTest()
294 ucol_setAttribute(collator.getAlias(), UCOL_NORMALIZATION_MODE, normalize, &status); in searchTest()
295 ucol_setAttribute(collator.getAlias(), UCOL_ALTERNATE_HANDLING, alternateHandling, &status); in searchTest()
298 collator.getAlias(), in searchTest()
336 collator.getAlias(), in searchTest()
630 UCollator *collator = ucol_open(clocale, &status); in bmSearchTest() local
631 ucol_setStrength(collator, collatorStrength); in bmSearchTest()
632 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, normalize, &status); in bmSearchTest()
633 ucol_setAttribute(collator, UCOL_ALTERNATE_HANDLING, alternateHandling, &status); in bmSearchTest()
[all …]
Dsvccoll.cpp217 Collator* collator; member
227 , collator(_collator) in CollatorInfo()
233 delete collator; in ~CollatorInfo()
288 return ci->collator->clone(); in createCollator()
/external/icu4c/i18n/
Dstsearch.cpp57 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
92 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in StringSearch()
120 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in StringSearch()
155 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in StringSearch()
182 that.m_strsrch_->collator, in StringSearch()
187 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in StringSearch()
221 that.m_strsrch_->collator, in operator =()
226 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in operator =()
241 this->m_strsrch_->collator == thatsrch.m_strsrch_->collator); in operator ==()
285 m_collator_.setUCollator((UCollator *)m_strsrch_->collator); in setCollator()
Dusearch.cpp306 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternCETable()
314 uprv_init_collIterate(strsrch->collator, pattern->text, in initializePatternCETable()
381 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternPCETable()
388 uprv_init_collIterate(strsrch->collator, pattern->text, in initializePatternPCETable()
802 inline int32_t getNextSafeOffset(const UCollator *collator, in getNextSafeOffset() argument
808 while (result != textlength && ucol_unsafeCP(text[result], collator)) { in getNextSafeOffset()
853 int32_t safeoffset = getNextSafeOffset(strsrch->collator, in checkExtraMatchAccents()
1179 const UCollator *collator = strsrch->collator; in checkNextExactContractionMatch() local
1190 if ((*end < textlength && ucol_unsafeCP(text[*end], collator)) || in checkNextExactContractionMatch()
1192 && ucol_unsafeCP(text[*start + 1], collator))) { in checkNextExactContractionMatch()
[all …]
Dcolldata.cpp461 CollData *get(UCollator *collator, UErrorCode &status);
467 static char *getKey(UCollator *collator, char *keyBuffer, int32_t *charBufferLength);
515 CollData *CollDataCache::get(UCollator *collator, UErrorCode &status) in get() argument
519 char *key = getKey(collator, keyBuffer, &keyLength); in get()
529 newData = new CollData(collator, key, keyLength, status); in get()
584 char *CollDataCache::getKey(UCollator *collator, char *keyBuffer, int32_t *keyBufferLength) in getKey() argument
587 … int32_t len = ucol_getShortDefinitionString(collator, NULL, keyBuffer, *keyBufferLength, &status); in getKey()
594 len = ucol_getShortDefinitionString(collator, NULL, keyBuffer, *keyBufferLength, &status); in getKey()
640 CollData::CollData(UCollator *collator, char *cacheKey, int32_t cacheKeyLength, UErrorCode &status) in CollData() argument
693 coll = ucol_safeClone(collator, NULL, NULL, &status); in CollData()
[all …]
Dnfrule.cpp1140 RuleBasedCollator* collator = (RuleBasedCollator*)formatter->getCollator(); in prefixLength() local
1141 CollationElementIterator* strIter = collator->createCollationElementIterator(str); in prefixLength()
1142 CollationElementIterator* prefixIter = collator->createCollationElementIterator(prefix); in prefixLength()
1144 if (collator == NULL || strIter == NULL || prefixIter == NULL) { in prefixLength()
1145 delete collator; in prefixLength()
1252 collator->setStrength(Collator::PRIMARY); in prefixLength()
1256 if (collator->equals(temp, prefix)) { in prefixLength()
1272 if (collator->equals(temp, prefix)) { in prefixLength()
1442 RuleBasedCollator* collator = (RuleBasedCollator*)(formatter->getCollator()); in allIgnorable() local
1443 CollationElementIterator* iter = collator->createCollationElementIterator(str); in allIgnorable()
[all …]
Drbnf.cpp656 , collator(NULL) in RuleBasedNumberFormat()
673 , collator(NULL) in RuleBasedNumberFormat()
690 , collator(NULL) in RuleBasedNumberFormat()
706 , collator(NULL) in RuleBasedNumberFormat()
723 , collator(NULL) in RuleBasedNumberFormat()
737 , collator(NULL) in RuleBasedNumberFormat()
811 , collator(NULL) in RuleBasedNumberFormat()
1223 if (!enabled && collator) { in setLenient()
1224 delete collator; in setLenient()
1225 collator = NULL; in setLenient()
[all …]
Dcoll.cpp385 Collator *collator; in createInstance() local
388 collator=new RuleBasedCollator(loc, status); in createInstance()
390 if (collator == 0) { in createInstance()
396 collator->getVersion(info); in createInstance()
398 delete collator; in createInstance()
403 return collator; in createInstance()
/external/chromium/chrome/browser/chromeos/options/
Dwifi_config_model.cc37 explicit CertNameComparator(icu::Collator* collator) in CertNameComparator() argument
38 : collator_(collator) { in CertNameComparator()
93 scoped_ptr<icu::Collator> collator; in UpdateCertificates() local
95 collator.reset( in UpdateCertificates()
100 collator.reset(NULL); in UpdateCertificates()
101 CertNameComparator cert_name_comparator(collator.get()); in UpdateCertificates()
/external/icu4c/test/cintltst/
Dusrchtst.c159 static UCollator *getCollator(const char *collator) in getCollator() argument
161 if (collator == NULL) { in getCollator()
164 if (strcmp(collator, "fr") == 0) { in getCollator()
167 else if (strcmp(collator, "de") == 0) { in getCollator()
170 else if (strcmp(collator, "es") == 0) { in getCollator()
547 UCollator *collator = getCollator(search.collator); in assertEqual() local
555 ucol_setStrength(collator, search.strength); in assertEqual()
556 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in assertEqual()
564 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqual()
568 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqual()
[all …]
/external/chromium/chrome/browser/autofill/
Dautofill_country.cc384 const std::string GetSortKey(const icu::Collator& collator,
466 const icu::Collator* collator = GetCollatorForLocale(locale); in AddLocalizedNamesForLocale() local
479 std::string sort_key = GetSortKey(*collator, in AddLocalizedNamesForLocale()
495 icu::Collator* collator = GetCollatorForLocale(locale); in GetCountryCodeForLocalizedName() local
502 std::string sort_key = GetSortKey(*collator, in GetCountryCodeForLocalizedName()
522 icu::Collator* collator(icu::Collator::createInstance(icu_locale, ignored)); in GetCollatorForLocale() local
526 collator->setAttribute(UCOL_STRENGTH, UCOL_SECONDARY, ignored); in GetCollatorForLocale()
528 collator->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, ignored); in GetCollatorForLocale()
530 collators_.insert(std::make_pair(locale, collator)); in GetCollatorForLocale()
536 const std::string CountryNames::GetSortKey(const icu::Collator& collator, in GetSortKey() argument
[all …]
/external/icu4c/i18n/unicode/
Dcolldata.h297 static CollData *open(UCollator *collator, UErrorCode &status);
425 CollData(UCollator *collator, char *cacheKey, int32_t cachekeyLength, UErrorCode &status);
430 static char *getCollatorKey(UCollator *collator, char *buffer, int32_t bufferLength);
Dtblcoll.h859 void setUCollator(UCollator *collator);
922 inline void RuleBasedCollator::setUCollator(UCollator *collator) in setUCollator() argument
928 ucollator = collator; in setUCollator()
Dusearch.h284 const UCollator *collator,
536 const UCollator *collator,
/external/chromium/chrome/browser/
Dbackground_application_list_model.cc27 explicit ExtensionNameComparator(icu::Collator* collator);
34 ExtensionNameComparator::ExtensionNameComparator(icu::Collator* collator) in ExtensionNameComparator() argument
35 : collator_(collator) { in ExtensionNameComparator()
85 scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error)); in GetServiceApplications() local
87 ExtensionNameComparator(collator.get())); in GetServiceApplications()
/external/webkit/Source/WebCore/xml/
DXSLTUnicodeSort.cpp167 Collator collator(comp->has_lang ? (const char*)comp->lang : "en"); in xsltUnicodeSortFunction() local
168 collator.setOrderLowerFirst(comp->lower_first); in xsltUnicodeSortFunction()
201 … tst = collator.collate(str1.characters(), str1.length(), str2.characters(), str2.length()); in xsltUnicodeSortFunction()
256 … tst = collator.collate(str1.characters(), str1.length(), str2.characters(), str2.length()); in xsltUnicodeSortFunction()
/external/webkit/Source/WebCore/icu/unicode/
Dusearch.h237 const UCollator *collator,
470 const UCollator *collator,
/external/chromium/chrome/browser/chromeos/input_method/
Dinput_method_util.cc282 explicit CompareLanguageCodesByLanguageName(icu::Collator* collator) in CompareLanguageCodesByLanguageName()
283 : collator_(collator) { in CompareLanguageCodesByLanguageName()
545 scoped_ptr<icu::Collator> collator( in SortLanguageCodesByNames() local
548 collator.reset(); in SortLanguageCodesByNames()
551 CompareLanguageCodesByLanguageName(collator.get())); in SortLanguageCodesByNames()

12