Home
last modified time | relevance | path

Searched refs:collator (Results 1 - 25 of 121) sorted by relevance

12345

/third_party/icu/icu4c/source/samples/coll/
H A Dcoll.cpp60 UCollator * collator = 0; variable
149 UCollationResult result = ucol_strcoll(collator, source, -1, target, -1); in strcmp()
160 * Creates a collator
164 // Set up an ICU collator in processCollator()
170 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
174 collator = ucol_open(opt_locale, &status); in processCollator()
189 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
192 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
195 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
199 ucol_setAttribute(collator, UCOL_CASE_FIRS in processCollator()
[all...]
/third_party/skia/third_party/externals/icu/source/samples/coll/
H A Dcoll.cpp60 UCollator * collator = 0; variable
149 UCollationResult result = ucol_strcoll(collator, source, -1, target, -1); in strcmp()
160 * Creates a collator
164 // Set up an ICU collator in processCollator()
170 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
174 collator = ucol_open(opt_locale, &status); in processCollator()
189 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
192 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
195 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
199 ucol_setAttribute(collator, UCOL_CASE_FIRS in processCollator()
[all...]
/third_party/icu/icu4c/source/samples/strsrch/
H A Dstrsrch.cpp64 UCollator * collator = 0; variable
151 * Creates a collator
155 // Set up an ICU collator in processCollator()
160 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
164 collator = ucol_open(opt_locale, &status); in processCollator()
179 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
182 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
185 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
189 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, in processCollator()
193 ucol_setAttribute(collator, UCOL_CASE_LEVE in processCollator()
[all...]
/third_party/skia/third_party/externals/icu/source/samples/strsrch/
H A Dstrsrch.cpp64 UCollator * collator = 0; variable
151 * Creates a collator
155 // Set up an ICU collator in processCollator()
160 collator = ucol_openRules(rules, -1, UCOL_OFF, UCOL_TERTIARY, in processCollator()
164 collator = ucol_open(opt_locale, &status); in processCollator()
179 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in processCollator()
182 ucol_setAttribute(collator, UCOL_FRENCH_COLLATION, UCOL_ON, &status); in processCollator()
185 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, in processCollator()
189 ucol_setAttribute(collator, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, in processCollator()
193 ucol_setAttribute(collator, UCOL_CASE_LEVE in processCollator()
[all...]
/third_party/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/text/
H A DRbnfScannerProviderImpl.java63 * end of the default collator for the locale, enabling additional equivalences
97 RuleBasedCollator collator = null; in createScanner()
99 // create a default collator based on the locale, in createScanner()
100 // then pull out that collator's rules, append any additional in createScanner()
102 // collator based on the combination of those rules in createScanner()
103 collator = (RuleBasedCollator)Collator.getInstance(locale.toLocale()); in createScanner()
105 String rules = collator.getRules() + extras; in createScanner()
106 collator = new RuleBasedCollator(rules); in createScanner()
108 collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION); in createScanner()
117 collator in createScanner()
125 private final RuleBasedCollator collator; global() field in RbnfScannerProviderImpl.RbnfLenientScannerImpl
[all...]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/text/
H A DRbnfScannerProviderImpl.java65 * end of the default collator for the locale, enabling additional equivalences
99 RuleBasedCollator collator = null; in createScanner()
101 // create a default collator based on the locale, in createScanner()
102 // then pull out that collator's rules, append any additional in createScanner()
104 // collator based on the combination of those rules in createScanner()
105 collator = (RuleBasedCollator)Collator.getInstance(locale.toLocale()); in createScanner()
107 String rules = collator.getRules() + extras; in createScanner()
108 collator = new RuleBasedCollator(rules); in createScanner()
110 collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION); in createScanner()
119 collator in createScanner()
127 private final RuleBasedCollator collator; global() field in RbnfScannerProviderImpl.RbnfLenientScannerImpl
[all...]
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
H A DCollationThaiTest.java15 package com.ibm.icu.dev.test.collator;
87 warnln("could not construct Thai collator"); in TestCornerCases()
121 * sorted order, and confirm that the collator compares each line as
130 warnln("could not construct Thai collator"); in TestDictionary()
225 RuleBasedCollator collator; in TestInvalidThai()
228 collator = getThaiCollator(); in TestInvalidThai()
231 warnln("could not construct Thai collator"); in TestInvalidThai()
240 if (collator.compare(tests[i], tests[j]) > 0) { in TestInvalidThai()
247 = collator.getCollationElementIterator(tests[i]); in TestInvalidThai()
285 RuleBasedCollator collator; in TestReordering()
320 Collator collator; global() field in CollationThaiTest.StrCmp
[all...]
H A DCollationThreadTest.java10 package com.ibm.icu.dev.test.collator;
26 final Collator collator = Collator.getInstance(new Locale("pl", "", ""));
137 sort(temporaryData, collator);
150 private static void sort(String[] data, Collator collator) { in sort() argument
151 Arrays.sort(data, collator); in sort()
189 private Collator collator; field in CollationThreadTest.Test
194 Test(String name, String[] data, Collator collator, Random r, Control control) { in Test() argument
197 this.collator = collator; in Test()
213 sort(this.data, this.collator); in run()
[all...]
H A DCollationAPITest.java15 package com.ibm.icu.dev.test.collator;
191 * This tests the comparison convenience methods of a collator object.
252 * This tests the duplication of a collator object.
396 * This tests the hashCode method of a collator object.
442 * This tests the properties of a collator object.
539 errln("Creating fr_CA collator failed."); in TestJunkCollator()
543 doAssert(!(frCol.equals(junk)), "The junk is the same as the fr_CA collator."); in TestJunkCollator()
579 errln("Failure: Empty rules for the collator should fail"); in TestRuleBasedColl()
584 logln("PASS: Empty rules for the collator failed as expected"); in TestRuleBasedColl()
606 doAssert(!rule1.equals(rule2), "Default collator getRule in TestRuleBasedColl()
[all...]
H A DCollationChineseTest.java15 package com.ibm.icu.dev.test.collator;
39 RuleBasedCollator collator = null; in TestPinYin()
41 collator = (RuleBasedCollator)Collator.getInstance( in TestPinYin()
44 warnln("ERROR: in creation of collator of zh__PINYIN locale"); in TestPinYin()
48 CollationTest.doTest(this, collator, seq[i], seq[i + 1], -1); in TestPinYin()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/
H A DCollationThaiTest.java16 package ohos.global.icu.dev.test.collator;
90 warnln("could not construct Thai collator"); in TestCornerCases()
124 * sorted order, and confirm that the collator compares each line as
133 warnln("could not construct Thai collator"); in TestDictionary()
228 RuleBasedCollator collator; in TestInvalidThai()
231 collator = getThaiCollator(); in TestInvalidThai()
234 warnln("could not construct Thai collator"); in TestInvalidThai()
243 if (collator.compare(tests[i], tests[j]) > 0) { in TestInvalidThai()
250 = collator.getCollationElementIterator(tests[i]); in TestInvalidThai()
288 RuleBasedCollator collator; in TestReordering()
323 Collator collator; global() field in CollationThaiTest.StrCmp
[all...]
H A DCollationThreadTest.java11 package ohos.global.icu.dev.test.collator;
29 final Collator collator = Collator.getInstance(new Locale("pl", "", ""));
140 sort(temporaryData, collator);
153 private static void sort(String[] data, Collator collator) { in sort() argument
154 Arrays.sort(data, collator); in sort()
192 private Collator collator; field in CollationThreadTest.Test
197 Test(String name, String[] data, Collator collator, Random r, Control control) { in Test() argument
200 this.collator = collator; in Test()
216 sort(this.data, this.collator); in run()
[all...]
H A DCollationAPITest.java16 package ohos.global.icu.dev.test.collator;
194 * This tests the comparison convenience methods of a collator object.
255 * This tests the duplication of a collator object.
399 * This tests the hashCode method of a collator object.
445 * This tests the properties of a collator object.
542 errln("Creating fr_CA collator failed."); in TestJunkCollator()
546 doAssert(!(frCol.equals(junk)), "The junk is the same as the fr_CA collator."); in TestJunkCollator()
582 errln("Failure: Empty rules for the collator should fail"); in TestRuleBasedColl()
587 logln("PASS: Empty rules for the collator failed as expected"); in TestRuleBasedColl()
609 doAssert(!rule1.equals(rule2), "Default collator getRule in TestRuleBasedColl()
[all...]
H A DCollationChineseTest.java16 package ohos.global.icu.dev.test.collator;
42 RuleBasedCollator collator = null; in TestPinYin()
44 collator = (RuleBasedCollator)Collator.getInstance( in TestPinYin()
47 warnln("ERROR: in creation of collator of zh__PINYIN locale"); in TestPinYin()
51 CollationTest.doTest(this, collator, seq[i], seq[i + 1], -1); in TestPinYin()
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/search/
H A DSearchTest.java54 this.collator = coll; in SearchData()
63 String collator; field in SearchTest.SearchData
558 RuleBasedCollator getCollator(String collator) { in getCollator() argument
559 if (collator == null) { in getCollator()
561 } if (collator.equals("fr")) { in getCollator()
563 } else if (collator.equals("de")) { in getCollator()
565 } else if (collator.equals("es")) { in getCollator()
583 Collator collator = getCollator(search.collator); in assertCanonicalEqual()
593 collator in assertCanonicalEqual()
[all...]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/search/
H A DSearchTest.java57 this.collator = coll; in SearchData()
66 String collator; field in SearchTest.SearchData
561 RuleBasedCollator getCollator(String collator) { in getCollator() argument
562 if (collator == null) { in getCollator()
564 } if (collator.equals("fr")) { in getCollator()
566 } else if (collator.equals("de")) { in getCollator()
568 } else if (collator.equals("es")) { in getCollator()
586 Collator collator = getCollator(search.collator); in assertCanonicalEqual()
596 collator in assertCanonicalEqual()
[all...]
/third_party/icu/icu4c/source/test/intltest/
H A Dsrchtest.cpp33 dataerrln(__FILE__ " cannot test - failed to create collator."); \
183 RuleBasedCollator * StringSearchTest::getCollator(const char *collator) in getCollator() argument
185 if (collator == NULL) { in getCollator()
188 if (strcmp(collator, "fr") == 0) { in getCollator()
191 else if (strcmp(collator, "de") == 0) { in getCollator()
194 else if (strcmp(collator, "es") == 0) { in getCollator()
467 Collator *collator = getCollator(search->collator); in assertEqual() local
489 collator->setStrength(getECollationStrength(search->strength)); in assertEqual()
490 strsrch = new StringSearch(pattern, text, (RuleBasedCollator *)collator, in assertEqual()
524 Collator *collator = getCollator(search->collator); assertCanonicalEqual() local
577 Collator *collator = getCollator(search->collator); assertEqualWithAttribute() local
911 RuleBasedCollator *collator = getCollator(search->collator); TestBreakIterator() local
1014 RuleBasedCollator *collator = getCollator(search->collator); TestOverlap() local
1604 RuleBasedCollator *collator = new RuleBasedCollator(rules, TestContraction() local
1642 RuleBasedCollator *collator = new RuleBasedCollator(rules, TestIgnorable() local
1766 RuleBasedCollator *collator = getCollator(search->collator); TestBreakIteratorCanonical() local
1872 RuleBasedCollator *collator = getCollator(search->collator); TestOverlapCanonical() local
2111 Collator *collator = strsrch->getCollator(); TestGetSetOffsetCanonical() local
2209 RuleBasedCollator *collator = new RuleBasedCollator(rules, TestContractionCanonical() local
[all...]
/third_party/skia/third_party/externals/icu/source/i18n/
H A Dusearch.cpp151 // note for tertiary we can't use the collator->tertiaryMask, that in getCE()
302 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternCETable()
374 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternPCETable()
786 * @param collator collation sata
793 inline int32_t getNextSafeOffset(const UCollator *collator, in getNextSafeOffset() argument
799 while (result != textlength && ucol_unsafeCP(text[result], collator)) { in getNextSafeOffset()
844 int32_t safeoffset = getNextSafeOffset(strsrch->collator, in checkExtraMatchAccents()
1170 const UCollator *collator = strsrch->collator; in checkNextExactContractionMatch() local
1181 if ((*end < textlength && ucol_unsafeCP(text[*end], collator)) || in checkNextExactContractionMatch()
1529 getPreviousSafeOffset(const UCollator *collator, const UChar *text, int32_t textoffset) getPreviousSafeOffset() argument
1582 const UCollator *collator = strsrch->collator; doNextCanonicalSuffixMatch() local
1820 const UCollator *collator = strsrch->collator; checkNextCanonicalContractionMatch() local
2017 const UCollator *collator = strsrch->collator; checkPreviousExactContractionMatch() local
2242 const UCollator *collator = strsrch->collator; doPreviousCanonicalPrefixMatch() local
2457 const UCollator *collator = strsrch->collator; checkPreviousCanonicalContractionMatch() local
2612 UCollator *collator = ucol_open(locale, status); usearch_open() local
2633 usearch_openFromCollator( const UChar *pattern, int32_t patternlength, const UChar *text, int32_t textlength, const UCollator *collator, UBreakIterator *breakiter, UErrorCode *status) usearch_openFromCollator() argument
3013 usearch_setCollator( UStringSearch *strsrch, const UCollator *collator, UErrorCode *status) usearch_setCollator() argument
[all...]
/third_party/icu/icu4j/main/classes/collate/src/com/ibm/icu/text/
H A DCollationElementIterator.java89 * the comparison level of the collator. The method previous() returns the
91 * the collator. The Collation Element Iterator moves only in one direction
197 private CollationElementIterator(RuleBasedCollator collator) { in CollationElementIterator() argument
199 rbc_ = collator; in CollationElementIterator()
209 * collator. If the source string is empty, NULLORDER will be
213 * @param collator the RuleBasedCollator
216 CollationElementIterator(String source, RuleBasedCollator collator) { in CollationElementIterator() argument
217 this(collator); in CollationElementIterator()
220 // Note: The constructors should take settings & tailoring, not a collator,
233 * the collator
240 CollationElementIterator(CharacterIterator source, RuleBasedCollator collator) CollationElementIterator() argument
256 CollationElementIterator(UCharacterIterator source, RuleBasedCollator collator) CollationElementIterator() argument
[all...]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
H A DLocaleDisplayNames.java276 * @param collator how to collate—should normally be Collator.getInstance(getDisplayLocale())
285 public List<UiListItem> getUiList(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> collator) { in getUiList() argument
286 return getUiListCompareWholeItems(localeSet, UiListItem.getComparator(collator, inSelf)); in getUiList()
394 private final Comparator<Object> collator; field in LocaleDisplayNames.UiListItem.UiListItemComparator
396 UiListItemComparator(Comparator<Object> collator, boolean useSelf) { in UiListItemComparator() argument
397 this.collator = collator; in UiListItemComparator()
402 int result = useSelf ? collator.compare(o1.nameInSelf, o2.nameInSelf) in compare()
403 : collator.compare(o1.nameInDisplayLocale, o2.nameInDisplayLocale); in compare()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
H A DLocaleDisplayNames.java256 * @param collator how to collate—should normally be Collator.getInstance(getDisplayLocale())
264 public List<UiListItem> getUiList(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> collator) { in getUiList() argument
265 return getUiListCompareWholeItems(localeSet, UiListItem.getComparator(collator, inSelf)); in getUiList()
359 private final Comparator<Object> collator; field in LocaleDisplayNames.UiListItem.UiListItemComparator
361 UiListItemComparator(Comparator<Object> collator, boolean useSelf) { in UiListItemComparator() argument
362 this.collator = collator; in UiListItemComparator()
367 int result = useSelf ? collator.compare(o1.nameInSelf, o2.nameInSelf) in compare()
368 : collator.compare(o1.nameInDisplayLocale, o2.nameInDisplayLocale); in compare()
H A DCollationElementIterator.java90 * the comparison level of the collator. The method previous() returns the
92 * the collator. The Collation Element Iterator moves only in one direction
192 private CollationElementIterator(RuleBasedCollator collator) { in CollationElementIterator() argument
194 rbc_ = collator; in CollationElementIterator()
204 * collator. If the source string is empty, NULLORDER will be
208 * @param collator the RuleBasedCollator
210 CollationElementIterator(String source, RuleBasedCollator collator) { in CollationElementIterator() argument
211 this(collator); in CollationElementIterator()
214 // Note: The constructors should take settings & tailoring, not a collator,
227 * the collator
233 CollationElementIterator(CharacterIterator source, RuleBasedCollator collator) CollationElementIterator() argument
248 CollationElementIterator(UCharacterIterator source, RuleBasedCollator collator) CollationElementIterator() argument
[all...]
/third_party/icu/icu4c/source/i18n/
H A Dusearch.cpp128 // note for tertiary we can't use the collator->tertiaryMask, that in getCE()
277 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternCETable()
344 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternPCETable()
466 ucol_getLocaleByType(strsrch->collator, ULOC_VALID_LOCALE, &status), in getBreakIterator()
560 UCollator *collator = ucol_open(locale, status); in usearch_open() local
564 collator, breakiter, status); in usearch_open()
567 if (collator) { in usearch_open()
568 ucol_close(collator); in usearch_open()
586 const UCollator *collator, in usearch_openFromCollator()
599 if (pattern == nullptr || text == nullptr || collator in usearch_openFromCollator()
581 usearch_openFromCollator( const UChar *pattern, int32_t patternlength, const UChar *text, int32_t textlength, const UCollator *collator, UBreakIterator *breakiter, UErrorCode *status) usearch_openFromCollator() argument
963 usearch_setCollator( UStringSearch *strsrch, const UCollator *collator, UErrorCode *status) usearch_setCollator() argument
[all...]
/third_party/node/deps/icu-small/source/i18n/
H A Dusearch.cpp128 // note for tertiary we can't use the collator->tertiaryMask, that in getCE()
277 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternCETable()
344 coleiter = ucol_openElements(strsrch->collator, pattern->text, in initializePatternPCETable()
466 ucol_getLocaleByType(strsrch->collator, ULOC_VALID_LOCALE, &status), in getBreakIterator()
560 UCollator *collator = ucol_open(locale, status); in usearch_open() local
564 collator, breakiter, status); in usearch_open()
567 if (collator) { in usearch_open()
568 ucol_close(collator); in usearch_open()
586 const UCollator *collator, in usearch_openFromCollator()
599 if (pattern == nullptr || text == nullptr || collator in usearch_openFromCollator()
581 usearch_openFromCollator( const char16_t *pattern, int32_t patternlength, const char16_t *text, int32_t textlength, const UCollator *collator, UBreakIterator *breakiter, UErrorCode *status) usearch_openFromCollator() argument
961 usearch_setCollator( UStringSearch *strsrch, const UCollator *collator, UErrorCode *status) usearch_setCollator() argument
[all...]
/third_party/icu/icu4c/source/test/cintltst/
H A Dusrchtst.c64 log_err_status(*status, "Error opening collator\n"); in open()
161 * Getting the collator
163 static UCollator *getCollator(const char *collator) in getCollator() argument
165 if (collator == NULL) { in getCollator()
168 if (strcmp(collator, "fr") == 0) { in getCollator()
171 else if (strcmp(collator, "de") == 0) { in getCollator()
174 else if (strcmp(collator, "es") == 0) { in getCollator()
265 log_data_err("Opening collator failed.\n"); in TestOpenClose()
290 log_data_err("Opening collator failed.\n"); in TestOpenClose()
560 UCollator *collator in assertEqual() local
591 UCollator *collator = getCollator(search.collator); assertCanonicalEqual() local
632 UCollator *collator = getCollator(search.collator); assertEqualWithAttribute() local
788 UCollator *collator = getCollator(search->collator); TestBreakIterator() local
895 UCollator *collator = getCollator(search->collator); TestOverlap() local
1668 UCollator *collator; TestContraction() local
1711 UCollator *collator; TestIgnorable() local
1878 UCollator *collator = getCollator(search->collator); TestBreakIteratorCanonical() local
1996 UCollator *collator = getCollator(search->collator); TestOverlapCanonical() local
2282 UCollator *collator; TestGetSetOffsetCanonical() local
2396 UCollator *collator = NULL; TestContractionCanonical() local
[all...]

Completed in 33 milliseconds

12345