Logo Search packages:      
Sourcecode: icu version File versions

virtual void Collator::setStrength ( ECollationStrength  newStrength  )  [pure virtual]

Sets the minimum strength to be used in comparison or transformation.

Example of use:

  
  UErrorCode status = U_ZERO_ERROR;
  Collator*myCollation = Collator::createInstance(Locale::US, 
                                                         status);
  if (U_FAILURE(status)) return;
  myCollation->setStrength(Collator::PRIMARY);
  // result will be "abc" == "ABC"
  // tertiary differences will be ignored
  Collator::ComparisonResult result = myCollation->compare("abc", 
                                                              "ABC");
See also:
Collator::getStrength
Parameters:
newStrength the new comparison level.

Implemented in RuleBasedCollator.

Referenced by CollationAPITest::TestCollationKey(), CollationAPITest::TestCompare(), CollationAPITest::TestProperty(), CollationAPITest::TestSafeClone(), and CollationAPITest::TestSortKey().


Generated by  Doxygen 1.6.0   Back to index