Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 68

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: Collator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Collator Class Reference</h1><!-- doxytag: class="Collator" --><!-- doxytag: inherits="UObject" -->
<p>The <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> class performs locale-sensitive string comparison.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="coll_8h_source.html">coll.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Collator:</div>
<div class="dynsection">
 <div class="center">
  <img src="classCollator.gif" usemap="#Collator_map" alt=""/>
  <map id="Collator_map" name="Collator_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,116,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,116,24"/>
<area href="classRuleBasedCollator.html" alt="RuleBasedCollator" shape="rect" coords="0,168,116,192"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">ECollationStrength</a> { <br/>
&nbsp;&nbsp;<b>PRIMARY</b> =  0, 
<b>SECONDARY</b> =  1, 
<b>TERTIARY</b> =  2, 
<b>QUATERNARY</b> =  3, 
<br/>
&nbsp;&nbsp;<b>IDENTICAL</b> =  15
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Base letter represents a primary difference. </p>
 <a href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a> { <b>LESS</b> =  -1, 
<b>EQUAL</b> =  0, 
<b>GREATER</b> =  1
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>LESS is returned if source string is compared to be less than target string in the <a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare()</a> method. </p>
 <a href="classCollator.html#a05f22f81363f2613bea18a632b67686f">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aeed400dfca4ef25d95509265a1566ce9">~Collator</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#aeed400dfca4ef25d95509265a1566ce9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a5e9abbd44cc648351bcb398308a062a6">operator==</a> (const <a class="el" href="classCollator.html">Collator</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if "other" is the same as "this".  <a href="#a5e9abbd44cc648351bcb398308a062a6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a0ddd04141f65b3f22e1f6d2bf4f53007">operator!=</a> (const <a class="el" href="classCollator.html">Collator</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if "other" is not the same as "this".  <a href="#a0ddd04141f65b3f22e1f6d2bf4f53007"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html">Collator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a5b7873505ee31c3745c207cf45d114b4">clone</a> (void) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Makes a shallow copy of the current object.  <a href="#a5b7873505ee31c3745c207cf45d114b4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182">compare</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The comparison function compares the character data stored in two different strings.  <a href="#aca611b586fa47a756d2b29996f713182"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a87d53bab5e900d89ad27fd61ea6b985d">compare</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The comparison function compares the character data stored in two different strings.  <a href="#a87d53bab5e900d89ad27fd61ea6b985d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ab33b6fb1fb75bc8bf4d9d8374c9165bf">compare</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target, int32_t length) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does the same thing as compare but limits the comparison to a specified length.  <a href="#ab33b6fb1fb75bc8bf4d9d8374c9165bf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ad0ae017f1de0edd0aa10c504ea8bfd58">compare</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target, int32_t length, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does the same thing as compare but limits the comparison to a specified length.  <a href="#ad0ae017f1de0edd0aa10c504ea8bfd58"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a562ace5a124eafbf623c39e19b564b25">compare</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *target, int32_t targetLength) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The comparison function compares the character data stored in two different string arrays.  <a href="#a562ace5a124eafbf623c39e19b564b25"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a5f32ec22ac5ed66bff8d7707db9260d7">compare</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *target, int32_t targetLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The comparison function compares the character data stored in two different string arrays.  <a href="#a5f32ec22ac5ed66bff8d7707db9260d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aade78c5e46f2ce1034e7644b5e375a1d">compare</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> &amp;sIter, <a class="el" href="structUCharIterator.html">UCharIterator</a> &amp;tIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares two strings using the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#aade78c5e46f2ce1034e7644b5e375a1d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ae2c325d3dece39abd1e72a3dcc321df6">compareUTF8</a> (const <a class="el" href="classStringPiece.html">StringPiece</a> &amp;source, const <a class="el" href="classStringPiece.html">StringPiece</a> &amp;target, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares two UTF-8 strings using the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#ae2c325d3dece39abd1e72a3dcc321df6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollationKey.html">CollationKey</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ab48ddb212e12b9ef4ffa7163e2d7810a">getCollationKey</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classCollationKey.html">CollationKey</a> &amp;key, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Transforms the string into a series of characters that can be compared with <a class="el" href="classCollationKey.html#a175ce0d8cb5d392731a238e0de29cdda" title="Convenience method which does a string(bit-wise) comparison of the two collation...">CollationKey::compareTo</a>.  <a href="#ab48ddb212e12b9ef4ffa7163e2d7810a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollationKey.html">CollationKey</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#afd733f040738213f0e46847b1e31cf6a">getCollationKey</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, <a class="el" href="classCollationKey.html">CollationKey</a> &amp;key, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Transforms the string into a series of characters that can be compared with <a class="el" href="classCollationKey.html#a175ce0d8cb5d392731a238e0de29cdda" title="Convenience method which does a string(bit-wise) comparison of the two collation...">CollationKey::compareTo</a>.  <a href="#afd733f040738213f0e46847b1e31cf6a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a989efcbd6664efd0a8e738a2c1d3f357">hashCode</a> (void) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates the hash code for the collation object.  <a href="#a989efcbd6664efd0a8e738a2c1d3f357"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classLocale.html">Locale</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ab29b8994ac25fd1c5c9f5f58757c0d0c">getLocale</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the locale of the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#ab29b8994ac25fd1c5c9f5f58757c0d0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aea0a4ed08d95791194c307f95e4cd8f2">greater</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience method for comparing two strings based on the collation rules.  <a href="#aea0a4ed08d95791194c307f95e4cd8f2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aa87d324253cf094dc48a7a1e9b7b6afa">greaterOrEqual</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience method for comparing two strings based on the collation rules.  <a href="#aa87d324253cf094dc48a7a1e9b7b6afa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ae00999fae1a46616421f3469c53b82f3">equals</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience method for comparing two strings based on the collation rules.  <a href="#ae00999fae1a46616421f3469c53b82f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">ECollationStrength</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#abbd68b496b6063c5a09a35ce96e4ce93">getStrength</a> (void) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the minimum strength that will be use in comparison or transformation.  <a href="#abbd68b496b6063c5a09a35ce96e4ce93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a0337d30970c7b73a6885a31d6d7d2afa">setStrength</a> (<a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">ECollationStrength</a> newStrength)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the minimum strength to be used in comparison or transformation.  <a href="#a0337d30970c7b73a6885a31d6d7d2afa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a5884f921390751a8b6f831bd259a7b8d">getVersion</a> (<a class="el" href="uversion_8h.html#a61caef96ba86d8e86a4031925ea44e94">UVersionInfo</a> info) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the version information for a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#a5884f921390751a8b6f831bd259a7b8d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aeaf10ab8b08d195a294a9b15aa7195da">getDynamicClassID</a> (void) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY.  <a href="#aeaf10ab8b08d195a294a9b15aa7195da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a132f1d7ad918bc1f4dcb956fd74ea808">setAttribute</a> (<a class="el" href="ucol_8h.html#a583fbe7fc4a850e2fcc692e766d2826c">UColAttribute</a> attr, <a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UColAttributeValue</a> value, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Universal attribute setter.  <a href="#a132f1d7ad918bc1f4dcb956fd74ea808"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UColAttributeValue</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a84c6c013a46196d829f71fa843ae7933">getAttribute</a> (<a class="el" href="ucol_8h.html#a583fbe7fc4a850e2fcc692e766d2826c">UColAttribute</a> attr, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Universal attribute getter.  <a href="#a84c6c013a46196d829f71fa843ae7933"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ab6e4fc13e278beca8a39539dc326a913">setVariableTop</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *varTop, int32_t len, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the variable top to a collation element value of a string supplied.  <a href="#ab6e4fc13e278beca8a39539dc326a913"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#adbf3ad5122866f9a16d39ca07779ddce">setVariableTop</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> varTop, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the variable top to a collation element value of a string supplied.  <a href="#adbf3ad5122866f9a16d39ca07779ddce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#afc34e06d5d3675e6e6ad26a1ee303690">setVariableTop</a> (const uint32_t varTop, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the variable top to a collation element value supplied.  <a href="#afc34e06d5d3675e6e6ad26a1ee303690"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#adff24c669022242ae00dd2c0c460bbf1">getVariableTop</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the variable top value of a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#adff24c669022242ae00dd2c0c460bbf1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeSet.html">UnicodeSet</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a905d1e33377b611a78ec63ae6c15d3c6">getTailoredSet</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an <a class="el" href="classUnicodeSet.html" title="A mutable set of Unicode characters and multicharacter strings.">UnicodeSet</a> that contains all the characters and sequences tailored in this collator.  <a href="#a905d1e33377b611a78ec63ae6c15d3c6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classCollator.html">Collator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aa97156a2a27c2e7fc0fccd0aee61de5a">safeClone</a> (void)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Thread safe cloning operation.  <a href="#aa97156a2a27c2e7fc0fccd0aee61de5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ae524fd43a06d4429e2c76bef35874d4c">getSortKey</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, uint8_t *result, int32_t resultLength) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sort key as an array of bytes from an <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>.  <a href="#ae524fd43a06d4429e2c76bef35874d4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#af379292af58ae29650690a02c410bfe1">getSortKey</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, uint8_t *result, int32_t resultLength) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the sort key as an array of bytes from an UChar buffer.  <a href="#af379292af58ae29650690a02c410bfe1"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCollator.html">Collator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a685bc906ba633d0d7653089d1f1a4dc5">createInstance</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;err)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object for the current default locale.  <a href="#a685bc906ba633d0d7653089d1f1a4dc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCollator.html">Collator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a8487edc8b01ce2e8267053b19ba114ee">createInstance</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;loc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;err)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the table-based collation object for the desired locale.  <a href="#a8487edc8b01ce2e8267053b19ba114ee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a6aed25d37a7937d21599685754198689">getDisplayName</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;objectLocale, const <a class="el" href="classLocale.html">Locale</a> &amp;displayLocale, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get name of the object for the desired <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>, in the desired langauge.  <a href="#a6aed25d37a7937d21599685754198689"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ace5e715921cbc6129449d08711c152df">getDisplayName</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;objectLocale, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get name of the object for the desired <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>, in the langauge of the default locale.  <a href="#ace5e715921cbc6129449d08711c152df"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classLocale.html">Locale</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#af12be166591b536009fbcb636e56515f">getAvailableLocales</a> (int32_t &amp;count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the set of Locales for which Collations are installed.  <a href="#af12be166591b536009fbcb636e56515f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#acd369233c66c780d7ef230fa4fc5d972">getAvailableLocales</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a <a class="el" href="classStringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api.">StringEnumeration</a> over the locales available at the time of the call, including registered locales.  <a href="#acd369233c66c780d7ef230fa4fc5d972"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aa7f1d5f15b6fc722e8aace3160c52504">getKeywords</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a string enumerator of all possible keywords that are relevant to collation.  <a href="#aa7f1d5f15b6fc722e8aace3160c52504"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a1a1cc517b9c3b82cf8eea3956abdafc5">getKeywordValues</a> (const char *keyword, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a keyword, create a string enumeration of all values for that keyword that are currently in use.  <a href="#a1a1cc517b9c3b82cf8eea3956abdafc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a4be23583fa02f2074923858c2522acf8">getKeywordValuesForLocale</a> (const char *keyword, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> commonlyUsed, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a key and a locale, returns an array of string values in a preferred order that would make a difference.  <a href="#a4be23583fa02f2074923858c2522acf8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classLocale.html">Locale</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a23ffda18b6d183b6c62b36718416b528">getFunctionalEquivalent</a> (const char *keyword, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> &amp;isAvailable, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.  <a href="#a23ffda18b6d183b6c62b36718416b528"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a101e1f1b5eac8264ad5274b8e8bb9eed">registerInstance</a> (<a class="el" href="classCollator.html">Collator</a> *toAdopt, const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a new <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>.  <a href="#a101e1f1b5eac8264ad5274b8e8bb9eed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#aabab7bd7531b5697256e7e7f5437faa1">registerFactory</a> (<a class="el" href="classCollatorFactory.html">CollatorFactory</a> *toAdopt, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register a new <a class="el" href="classCollatorFactory.html" title="A factory, used with registerFactory, the creates multiple collators and provides...">CollatorFactory</a>.  <a href="#aabab7bd7531b5697256e7e7f5437faa1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#afb6f76b673673ddd0bbb2690d135fd56">unregister</a> (<a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a> key, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unregister a previously-registered <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> or <a class="el" href="classCollatorFactory.html" title="A factory, used with registerFactory, the creates multiple collators and provides...">CollatorFactory</a> using the key returned from the register call.  <a href="#afb6f76b673673ddd0bbb2690d135fd56"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a771c2a750d025b9c5497210318473465">getBound</a> (const uint8_t *source, int32_t sourceLength, <a class="el" href="ucol_8h.html#aa3b11e0e399df62d3048174b8309657c">UColBoundMode</a> boundType, uint32_t noOfLevels, uint8_t *result, int32_t resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Produce a bound for a given sortkey and a number of levels.  <a href="#a771c2a750d025b9c5497210318473465"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a79465f4dba5cd6a6ee0ff1dc12f82ad9">createUCollator</a> (const char *loc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">used only by ucol_open, not for public use  <a href="#a79465f4dba5cd6a6ee0ff1dc12f82ad9"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a81d189c935adebdb742589212f9ba0e0">Collator</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#a81d189c935adebdb742589212f9ba0e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a2d56899e3a0bca4fa08a3b8a5f1752bc">Collator</a> (<a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UCollationStrength</a> collationStrength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> decompositionMode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#a2d56899e3a0bca4fa08a3b8a5f1752bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#a57d135eb7bb3a137536554f2bd979b05">Collator</a> (const <a class="el" href="classCollator.html">Collator</a> &amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#a57d135eb7bb3a137536554f2bd979b05"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCollator.html#ab480c30e10864f7c46cda00389bd2d34">setLocales</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;requestedLocale, const <a class="el" href="classLocale.html">Locale</a> &amp;validLocale, const <a class="el" href="classLocale.html">Locale</a> &amp;actualLocale)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used internally by registraton to define the requested and valid locales.  <a href="#ab480c30e10864f7c46cda00389bd2d34"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6a9dabbbc5633905fce8c282b031ffc"></a><!-- doxytag: member="Collator::CFactory" ref="ab6a9dabbbc5633905fce8c282b031ffc" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>CFactory</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80bbb65f28838eba42b00d611909e8d3"></a><!-- doxytag: member="Collator::SimpleCFactory" ref="a80bbb65f28838eba42b00d611909e8d3" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>SimpleCFactory</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adbce2a122c7c040633075706b9867183"></a><!-- doxytag: member="Collator::ICUCollatorFactory" ref="adbce2a122c7c040633075706b9867183" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>ICUCollatorFactory</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49f66cb9f432dd77eefae3d1ecaeb9f5"></a><!-- doxytag: member="Collator::ICUCollatorService" ref="a49f66cb9f432dd77eefae3d1ecaeb9f5" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>ICUCollatorService</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> class performs locale-sensitive string comparison. </p>
<p><br/>
 You use this class to build searching and sorting routines for natural language text.<br/>
 <em>Important: </em>The ICU collation service has been reimplemented in order to achieve better performance and UCA compliance. For details, see the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm">collation design document</a>. </p>
<p><code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> is an abstract base class. Subclasses implement specific collation strategies. One subclass, <code><a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a></code>, is currently provided and is applicable to a wide set of languages. Other subclasses may be created to handle more specialized needs. </p>
<p>Like other locale-sensitive classes, you can use the static factory method, <code>createInstance</code>, to obtain the appropriate <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> object for a given locale. You will only need to look at the subclasses of <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> if you need to understand the details of a particular collation strategy or if you need to modify that strategy. </p>
<p>The following example shows how to compare two strings using the <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code> for the default locale.  <blockquote> <pre>
 <div class="fragment"><pre class="fragment"> <span class="comment">// Compare two strings in the default locale</span>
 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> success = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
 <a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>* myCollator = <a class="code" href="classCollator.html#a685bc906ba633d0d7653089d1f1a4dc5" title="Creates the Collator object for the current default locale.">Collator::createInstance</a>(success);
 <span class="keywordflow">if</span> (myCollator-&gt;<a class="code" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare</a>(<span class="stringliteral">&quot;abc&quot;</span>, <span class="stringliteral">&quot;ABC&quot;</span>) &lt; 0)
   cout &lt;&lt; <span class="stringliteral">&quot;abc is less than ABC&quot;</span> &lt;&lt; endl;
 <span class="keywordflow">else</span>
   cout &lt;&lt; <span class="stringliteral">&quot;abc is greater than or equal to ABC&quot;</span> &lt;&lt; endl;
</pre></div>
 </pre>  </blockquote> <p>You can set a <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code>'s <em>strength</em> property to determine the level of difference considered significant in comparisons. Five strengths are provided: <code>PRIMARY</code>, <code>SECONDARY</code>, <code>TERTIARY</code>, <code>QUATERNARY</code> and <code>IDENTICAL</code>. The exact assignment of strengths to language features is locale dependant. For example, in Czech, "e" and "f" are considered primary differences, while "e" and "\u00EA" are secondary differences, "e" and "E" are tertiary differences and "e" and "e" are identical. The following shows how both case and accents could be ignored for US English.  <blockquote> <pre>
 <div class="fragment"><pre class="fragment"> <span class="comment">//Get the Collator for US English and set its strength to PRIMARY</span>
 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> success = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
 <a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>* usCollator = <a class="code" href="classCollator.html#a685bc906ba633d0d7653089d1f1a4dc5" title="Creates the Collator object for the current default locale.">Collator::createInstance</a>(Locale::US, success);
 usCollator-&gt;<a class="code" href="classCollator.html#a0337d30970c7b73a6885a31d6d7d2afa" title="Sets the minimum strength to be used in comparison or transformation.">setStrength</a>(Collator::PRIMARY);
 <span class="keywordflow">if</span> (usCollator-&gt;<a class="code" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare</a>(<span class="stringliteral">&quot;abc&quot;</span>, <span class="stringliteral">&quot;ABC&quot;</span>) == 0)
     cout &lt;&lt; <span class="stringliteral">&quot;&apos;abc&apos; and &apos;ABC&apos; strings are equivalent with strength PRIMARY&quot;</span> &lt;&lt; endl;
</pre></div>
 </pre>  </blockquote> <p>For comparing strings exactly once, the <code>compare</code> method provides the best performance. When sorting a list of strings however, it is generally necessary to compare each string multiple times. In this case, sort keys provide better performance. The <code>getSortKey</code> methods convert a string to a series of bytes that can be compared bitwise against other sort keys using <code>strcmp()</code>. Sort keys are written as zero-terminated byte strings. They consist of several substrings, one for each collation strength level, that are delimited by 0x01 bytes. If the string code points are appended for UCOL_IDENTICAL, then they are processed for correct code point order comparison and may contain 0x01 bytes but not zero bytes.  </p>
<p>An older set of APIs returns a <code><a class="el" href="classCollationKey.html" title="Collation keys are generated by the Collator class.">CollationKey</a></code> object that wraps the sort key bytes instead of returning the bytes themselves. Its use is deprecated, but it is still available for compatibility with Java.  </p>
<p><b>Note:</b> <code><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a></code>s with different <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>, and CollationStrength settings will return different sort orders for the same set of strings. Locales have specific collation rules, and the way in which secondary and tertiary differences are taken into account, for example, will result in a different sorting order for same strings.  </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classRuleBasedCollator.html" title="The RuleBasedCollator class provides the simple implementation of Collator, using...">RuleBasedCollator</a> </dd>
<dd>
<a class="el" href="classCollationKey.html" title="Collation keys are generated by the Collator class.">CollationKey</a> </dd>
<dd>
<a class="el" href="classCollationElementIterator.html" title="The CollationElementIterator class is used as an iterator to walk through each character...">CollationElementIterator</a> </dd>
<dd>
<a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> </dd>
<dd>
<a class="el" href="classNormalizer.html" title="The Normalizer class supports the standard normalization forms described in Unicode...">Normalizer</a> </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>2.0 11/15/01 </dd></dl>

<p>Definition at line <a class="el" href="coll_8h_source.html#l00177">177</a> of file <a class="el" href="coll_8h_source.html">coll.h</a>.</p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a2872c36ad74fc1100331783afe6b38d5"></a><!-- doxytag: member="Collator::ECollationStrength" ref="a2872c36ad74fc1100331783afe6b38d5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">Collator::ECollationStrength</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Base letter represents a primary difference. </p>
<p>Set comparison level to PRIMARY to ignore secondary and tertiary differences.<br/>
 Use this to set the strength of a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object.<br/>
 Example of primary difference, "abc" &lt; "abd"</p>
<p>Diacritical differences on the same base letter represent a secondary difference. Set comparison level to SECONDARY to ignore tertiary differences. Use this to set the strength of a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object.<br/>
 Example of secondary difference, "&amp;auml;" &gt;&gt; "a".</p>
<p>Uppercase and lowercase versions of the same character represents a tertiary difference. Set comparison level to TERTIARY to include all comparison differences. Use this to set the strength of a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object.<br/>
 Example of tertiary difference, "abc" &lt;&lt;&lt; "ABC".</p>
<p>Two characters are considered "identical" when they have the same unicode spellings.<br/>
 For example, "&amp;auml;" == "&amp;auml;".</p>
<p>UCollationStrength is also used to determine the strength of sort keys generated from <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> objects. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002290">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="coll_8h_source.html#l00207">207</a> of file <a class="el" href="coll_8h_source.html">coll.h</a>.</p>

</div>
</div>
<a class="anchor" id="a05f22f81363f2613bea18a632b67686f"></a><!-- doxytag: member="Collator::EComparisonResult" ref="a05f22f81363f2613bea18a632b67686f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">Collator::EComparisonResult</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>LESS is returned if source string is compared to be less than target string in the <a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare()</a> method. </p>
<p>EQUAL is returned if source string is compared to be equal to target string in the <a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare()</a> method. GREATER is returned if source string is compared to be greater than target string in the <a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare()</a> method. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">Collator::compare</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000183">Deprecated:</a></b></dt><dd>ICU 2.6. Use C enum UCollationResult defined in <a class="el" href="ucol_8h.html" title="C API: Collator.">ucol.h</a> </dd></dl>

<p>Definition at line <a class="el" href="coll_8h_source.html#l00226">226</a> of file <a class="el" href="coll_8h_source.html">coll.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aeed400dfca4ef25d95509265a1566ce9"></a><!-- doxytag: member="Collator::~Collator" ref="aeed400dfca4ef25d95509265a1566ce9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Collator::~Collator </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002291">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a81d189c935adebdb742589212f9ba0e0"></a><!-- doxytag: member="Collator::Collator" ref="a81d189c935adebdb742589212f9ba0e0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Collator::Collator </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<p>Constructor is different from the old default <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> constructor. The task for determing the default collation strength and normalization mode is left to the child class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002330">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a2d56899e3a0bca4fa08a3b8a5f1752bc"></a><!-- doxytag: member="Collator::Collator" ref="a2d56899e3a0bca4fa08a3b8a5f1752bc" args="(UCollationStrength collationStrength, UNormalizationMode decompositionMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Collator::Collator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UCollationStrength</a>&nbsp;</td>
          <td class="paramname"> <em>collationStrength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&nbsp;</td>
          <td class="paramname"> <em>decompositionMode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<p>Empty constructor, does not handle the arguments. This constructor is done for backward compatibility with 1.7 and 1.8. The task for handling the argument collation strength and normalization mode is left to the child class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>collationStrength</em>&nbsp;</td><td>collation strength </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>decompositionMode</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000192">Deprecated:</a></b></dt><dd>ICU 2.4. Subclasses should use the default constructor instead and handle the strength and normalization mode themselves. </dd></dl>

</div>
</div>
<a class="anchor" id="a57d135eb7bb3a137536554f2bd979b05"></a><!-- doxytag: member="Collator::Collator" ref="a57d135eb7bb3a137536554f2bd979b05" args="(const Collator &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Collator::Collator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCollator.html">Collator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object to be copied from </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002331">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5b7873505ee31c3745c207cf45d114b4"></a><!-- doxytag: member="Collator::clone" ref="a5b7873505ee31c3745c207cf45d114b4" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html">Collator</a>* Collator::clone </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Makes a shallow copy of the current object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a copy of this object </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002294">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#afc3925de9f5b4b8c58192721cbb5bc57">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="aade78c5e46f2ce1034e7644b5e375a1d"></a><!-- doxytag: member="Collator::compare" ref="aade78c5e46f2ce1034e7644b5e375a1d" args="(UCharIterator &amp;sIter, UCharIterator &amp;tIter, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>sIter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>tIter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares two strings using the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<p>Returns whether the first one compares less than/equal to/greater than the second one. This version takes <a class="el" href="structUCharIterator.html" title="C API for code unit iteration.">UCharIterator</a> input. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sIter</em>&nbsp;</td><td>the first ("source") string iterator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tIter</em>&nbsp;</td><td>the second ("target") string iterator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>UCOL_LESS, UCOL_EQUAL or UCOL_GREATER </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002300">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#a3ef0967c8d475d91884193f2d1f60c21">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a5f32ec22ac5ed66bff8d7707db9260d7"></a><!-- doxytag: member="Collator::compare" ref="a5f32ec22ac5ed66bff8d7707db9260d7" args="(const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>targetLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The comparison function compares the character data stored in two different string arrays. </p>
<p>Returns information about whether a string array is less than, greater than or equal to another string array. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string array to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>the length of the source string array. If this value is equal to -1, the string array is null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>targetLength</em>&nbsp;</td><td>the length of the target string array. If this value is equal to -1, the string array is null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>possible error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns an enum value. UCOL_GREATER if source is greater than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less than target </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002299">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a6d410b9e3a7a3c353ca961ffbe6f5fdb">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a562ace5a124eafbf623c39e19b564b25"></a><!-- doxytag: member="Collator::compare" ref="a562ace5a124eafbf623c39e19b564b25" args="(const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>targetLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The comparison function compares the character data stored in two different string arrays. </p>
<p>Returns information about whether a string array is less than, greater than or equal to another string array. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string array to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>the length of the source string array. If this value is equal to -1, the string array is null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>targetLength</em>&nbsp;</td><td>the length of the target string array. If this value is equal to -1, the string array is null-terminated. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a byte value. GREATER if source is greater than target; EQUAL if source is equal to target; LESS if source is less than target </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000186">Deprecated:</a></b></dt><dd>ICU 2.6 use the overload with UErrorCode &amp; </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#aa93718b20d61f023bd126d5ed74ae1e0">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ad0ae017f1de0edd0aa10c504ea8bfd58"></a><!-- doxytag: member="Collator::compare" ref="ad0ae017f1de0edd0aa10c504ea8bfd58" args="(const UnicodeString &amp;source, const UnicodeString &amp;target, int32_t length, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Does the same thing as compare but limits the comparison to a specified length. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the length the comparison is limited to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>possible error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns an enum value. UCOL_GREATER if source (up to the specified length) is greater than target; UCOL_EQUAL if source (up to specified length) is equal to target; UCOL_LESS if source (up to the specified length) is less than target. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002298">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#acdc1ac2c3ded9364391e9b350d8b3842">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ab33b6fb1fb75bc8bf4d9d8374c9165bf"></a><!-- doxytag: member="Collator::compare" ref="ab33b6fb1fb75bc8bf4d9d8374c9165bf" args="(const UnicodeString &amp;source, const UnicodeString &amp;target, int32_t length) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Does the same thing as compare but limits the comparison to a specified length. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the length the comparison is limited to </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a byte value. GREATER if source (up to the specified length) is greater than target; EQUAL if source (up to specified length) is equal to target; LESS if source (up to the specified length) is less than target. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000185">Deprecated:</a></b></dt><dd>ICU 2.6 use the overload with UErrorCode &amp; </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#a1b7b66b3376e53e186cbf5f60fa4505d">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a87d53bab5e900d89ad27fd61ea6b985d"></a><!-- doxytag: member="Collator::compare" ref="a87d53bab5e900d89ad27fd61ea6b985d" args="(const UnicodeString &amp;source, const UnicodeString &amp;target, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The comparison function compares the character data stored in two different strings. </p>
<p>Returns information about whether a string is less than, greater than or equal to another string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>possible error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns an enum value. UCOL_GREATER if source is greater than target; UCOL_EQUAL if source is equal to target; UCOL_LESS if source is less than target </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002297">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#ab011371ceb1f45df5de1a458d7612aa8">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="aca611b586fa47a756d2b29996f713182"></a><!-- doxytag: member="Collator::compare" ref="aca611b586fa47a756d2b29996f713182" args="(const UnicodeString &amp;source, const UnicodeString &amp;target) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html#a05f22f81363f2613bea18a632b67686f">EComparisonResult</a> Collator::compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The comparison function compares the character data stored in two different strings. </p>
<p>Returns information about whether a string is less than, greater than or equal to another string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the string that is to be compared with the source string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a byte value. GREATER if source is greater than target; EQUAL if source is equal to target; LESS if source is less than target </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000184">Deprecated:</a></b></dt><dd>ICU 2.6 use the overload with UErrorCode &amp; </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#a49b2017fd4861a6361e6b568d887adc2">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ae2c325d3dece39abd1e72a3dcc321df6"></a><!-- doxytag: member="Collator::compareUTF8" ref="ae2c325d3dece39abd1e72a3dcc321df6" args="(const StringPiece &amp;source, const StringPiece &amp;target, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#a8b4e71db8109af87f84ac1576e2b245d">UCollationResult</a> Collator::compareUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classStringPiece.html">StringPiece</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classStringPiece.html">StringPiece</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares two UTF-8 strings using the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<p>Returns whether the first one compares less than/equal to/greater than the second one. This version takes UTF-8 input. Note that a <a class="el" href="classStringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> can be implicitly constructed from a std::string or a NUL-terminated const char * string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the first UTF-8 string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the second UTF-8 string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>UCOL_LESS, UCOL_EQUAL or UCOL_GREATER </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002301">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a8487edc8b01ce2e8267053b19ba114ee"></a><!-- doxytag: member="Collator::createInstance" ref="a8487edc8b01ce2e8267053b19ba114ee" args="(const Locale &amp;loc, UErrorCode &amp;err)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classCollator.html">Collator</a>* Collator::createInstance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>loc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>err</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the table-based collation object for the desired locale. </p>
<p>The resource of the desired locale will be loaded by ResourceLoader. Locale::ENGLISH is the base collation table and all other languages are built on top of it with additional language-specific modifications. The UErrorCode&amp; err parameter is used to return status information to the user. To check whether the construction succeeded or not, you should check the value of <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS(err)</a>. If you wish more detailed information, you can check for informational error results which still indicate success. U_USING_FALLBACK_ERROR indicates that a fall back locale was used. For example, 'de_CH' was requested, but nothing was found there, so 'de' was used. U_USING_DEFAULT_ERROR indicates that the default locale data was used; neither the requested locale nor any of its fall back locales could be found. The caller owns the returned object and is responsible for deleting it. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>loc</em>&nbsp;</td><td>The locale ID for which to open a collator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>err</em>&nbsp;</td><td>the error code status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the created table-based collation object based on the desired locale. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> </dd>
<dd>
ResourceLoader </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002296">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a685bc906ba633d0d7653089d1f1a4dc5"></a><!-- doxytag: member="Collator::createInstance" ref="a685bc906ba633d0d7653089d1f1a4dc5" args="(UErrorCode &amp;err)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classCollator.html">Collator</a>* Collator::createInstance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>err</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object for the current default locale. </p>
<p>The default locale is determined by <a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c" title="Common methods of getting the current default Locale.">Locale::getDefault</a>. The UErrorCode&amp; err parameter is used to return status information to the user. To check whether the construction succeeded or not, you should check the value of <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS(err)</a>. If you wish more detailed information, you can check for informational error results which still indicate success. U_USING_FALLBACK_ERROR indicates that a fall back locale was used. For example, 'de_CH' was requested, but nothing was found there, so 'de' was used. U_USING_DEFAULT_ERROR indicates that the default locale data was used; neither the requested locale nor any of its fall back locales could be found. The caller owns the returned object and is responsible for deleting it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>err</em>&nbsp;</td><td>the error code status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the collation object of the default locale.(for example, en_US) </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c" title="Common methods of getting the current default Locale.">Locale::getDefault</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002295">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a79465f4dba5cd6a6ee0ff1dc12f82ad9"></a><!-- doxytag: member="Collator::createUCollator" ref="a79465f4dba5cd6a6ee0ff1dc12f82ad9" args="(const char *loc, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a>* Collator::createUCollator </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>loc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>used only by ucol_open, not for public use </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000216">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="ae00999fae1a46616421f3469c53b82f3"></a><!-- doxytag: member="Collator::equals" ref="ae00999fae1a46616421f3469c53b82f3" args="(const UnicodeString &amp;source, const UnicodeString &amp;target) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::equals </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience method for comparing two strings based on the collation rules. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the target string to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the strings are equal according to the collation rules. false, otherwise. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">Collator::compare</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002305">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a84c6c013a46196d829f71fa843ae7933"></a><!-- doxytag: member="Collator::getAttribute" ref="a84c6c013a46196d829f71fa843ae7933" args="(UColAttribute attr, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UColAttributeValue</a> Collator::getAttribute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucol_8h.html#a583fbe7fc4a850e2fcc692e766d2826c">UColAttribute</a>&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Universal attribute getter. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>attr</em>&nbsp;</td><td>attribute type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>to indicate whether the operation went on smoothly or there were errors </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>attribute value </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002320">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a4b104673bfec94c58f91478f14bcd286">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="acd369233c66c780d7ef230fa4fc5d972"></a><!-- doxytag: member="Collator::getAvailableLocales" ref="acd369233c66c780d7ef230fa4fc5d972" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* Collator::getAvailableLocales </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a <a class="el" href="classStringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api.">StringEnumeration</a> over the locales available at the time of the call, including registered locales. </p>
<p>If a severe error occurs (such as out of memory condition) this will return null. If there is no locale data, an empty enumeration will be returned. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="el" href="classStringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api.">StringEnumeration</a> over the locales available at the time of the call </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002309">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="af12be166591b536009fbcb636e56515f"></a><!-- doxytag: member="Collator::getAvailableLocales" ref="af12be166591b536009fbcb636e56515f" args="(int32_t &amp;count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static const <a class="el" href="classLocale.html">Locale</a>* Collator::getAvailableLocales </td>
          <td>(</td>
          <td class="paramtype">int32_t &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the set of Locales for which Collations are installed. </p>
<p>Note this does not include locales supported by registered collators. If collators might have been registered, use the overload of getAvailableLocales that returns a <a class="el" href="classStringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api.">StringEnumeration</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>the output parameter of number of elements in the locale list </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the list of available locales for which collations are installed </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002308">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a771c2a750d025b9c5497210318473465"></a><!-- doxytag: member="Collator::getBound" ref="a771c2a750d025b9c5497210318473465" args="(const uint8_t *source, int32_t sourceLength, UColBoundMode boundType, uint32_t noOfLevels, uint8_t *result, int32_t resultLength, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t Collator::getBound </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucol_8h.html#aa3b11e0e399df62d3048174b8309657c">UColBoundMode</a>&nbsp;</td>
          <td class="paramname"> <em>boundType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>noOfLevels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Produce a bound for a given sortkey and a number of levels. </p>
<p>Return value is always the number of bytes needed, regardless of whether the result buffer was big enough or even valid.<br/>
 Resulting bounds can be used to produce a range of strings that are between upper and lower bounds. For example, if bounds are produced for a sortkey of string "smith", strings between upper and lower bounds with one level would include "Smith", "SMITH", "sMiTh".<br/>
 There are two upper bounds that can be produced. If UCOL_BOUND_UPPER is produced, strings matched would be as above. However, if bound produced using UCOL_BOUND_UPPER_LONG is used, the above example will also match "Smithsonian" and similar.<br/>
 For more on usage, see example in cintltst/capitst.c in procedure TestBounds. Sort keys may be compared using <code>strcmp</code>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The source sortkey. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. (If an unmodified sortkey is passed, it is always null terminated). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>boundType</em>&nbsp;</td><td>Type of bound required. It can be UCOL_BOUND_LOWER, which produces a lower inclusive bound, UCOL_BOUND_UPPER, that produces upper bound that matches strings of the same length or UCOL_BOUND_UPPER_LONG that matches strings that have the same starting substring as the source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>noOfLevels</em>&nbsp;</td><td>Number of levels required in the resulting bound (for most uses, the recommended value is 1). See users guide for explanation on number of levels a sortkey can have. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the resulting sortkey. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Used for returning error code if something went wrong. If the number of levels requested is higher than the number of levels in the source key, a warning (U_SORT_KEY_TOO_SHORT_WARNING) is issued. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The size needed to fully store the bound. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ucoleitr_8h.html#a705331b3ca250e3f5f74accfee861fa4" title="get a hash code for a key.">ucol_keyHashCode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002329">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div>
<a class="anchor" id="afd733f040738213f0e46847b1e31cf6a"></a><!-- doxytag: member="Collator::getCollationKey" ref="afd733f040738213f0e46847b1e31cf6a" args="(const UChar *source, int32_t sourceLength, CollationKey &amp;key, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollationKey.html">CollationKey</a>&amp; Collator::getCollationKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classCollationKey.html">CollationKey</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Transforms the string into a series of characters that can be compared with <a class="el" href="classCollationKey.html#a175ce0d8cb5d392731a238e0de29cdda" title="Convenience method which does a string(bit-wise) comparison of the two collation...">CollationKey::compareTo</a>. </p>
<p>It is not possible to restore the original string from the chars in the sort key. The generated sort key handles only a limited number of ignorable characters. </p>
<p>Use CollationKey::equals or CollationKey::compare to compare the generated sort keys. </p>
<p>If the source string is null, a null collation key will be returned. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be transformed into a sort key. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>length of the collation key </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the collation key to be filled in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the error code status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the collation key of the string based on the collation rules. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>CollationKey::compare </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000188">Deprecated:</a></b></dt><dd>ICU 2.8 Use getSortKey(...) instead </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a36b0939e2dfb7c47fef177e0eec93700">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ab48ddb212e12b9ef4ffa7163e2d7810a"></a><!-- doxytag: member="Collator::getCollationKey" ref="ab48ddb212e12b9ef4ffa7163e2d7810a" args="(const UnicodeString &amp;source, CollationKey &amp;key, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollationKey.html">CollationKey</a>&amp; Collator::getCollationKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classCollationKey.html">CollationKey</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Transforms the string into a series of characters that can be compared with <a class="el" href="classCollationKey.html#a175ce0d8cb5d392731a238e0de29cdda" title="Convenience method which does a string(bit-wise) comparison of the two collation...">CollationKey::compareTo</a>. </p>
<p>It is not possible to restore the original string from the chars in the sort key. The generated sort key handles only a limited number of ignorable characters. </p>
<p>Use CollationKey::equals or CollationKey::compare to compare the generated sort keys. If the source string is null, a null collation key will be returned. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be transformed into a sort key. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the collation key to be filled in </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the error code status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the collation key of the string based on the collation rules. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>CollationKey::compare </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000187">Deprecated:</a></b></dt><dd>ICU 2.8 Use getSortKey(...) instead </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a509690ecc2c4de4683cc226b4317174f">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ace5e715921cbc6129449d08711c152df"></a><!-- doxytag: member="Collator::getDisplayName" ref="ace5e715921cbc6129449d08711c152df" args="(const Locale &amp;objectLocale, UnicodeString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; Collator::getDisplayName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>objectLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get name of the object for the desired <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>, in the langauge of the default locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>objectLocale</em>&nbsp;</td><td>must be from getAvailableLocales </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the fill-in parameter of the return value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>name of the object for the desired locale in the default language </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002307">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a6aed25d37a7937d21599685754198689"></a><!-- doxytag: member="Collator::getDisplayName" ref="a6aed25d37a7937d21599685754198689" args="(const Locale &amp;objectLocale, const Locale &amp;displayLocale, UnicodeString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; Collator::getDisplayName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>objectLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>displayLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get name of the object for the desired <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>, in the desired langauge. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>objectLocale</em>&nbsp;</td><td>must be from getAvailableLocales </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>displayLocale</em>&nbsp;</td><td>specifies the desired locale for output </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the fill-in parameter of the return value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>display-able name of the object for the object locale in the desired language </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002306">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aeaf10ab8b08d195a294a9b15aa7195da"></a><!-- doxytag: member="Collator::getDynamicClassID" ref="aeaf10ab8b08d195a294a9b15aa7195da" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> Collator::getDynamicClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a unique class ID POLYMORPHICALLY. </p>
<p>Pure virtual method. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic <a class="el" href="classCollator.html#a5e9abbd44cc648351bcb398308a062a6" title="Returns true if &quot;other&quot; is the same as &quot;this&quot;.">operator==()</a> and <a class="el" href="classCollator.html#a5b7873505ee31c3745c207cf45d114b4" title="Makes a shallow copy of the current object.">clone()</a> methods call this method. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002318">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262">UObject</a>.</p>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a475f2ae0796fc004c76c10d30b991ca5">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a23ffda18b6d183b6c62b36718416b528"></a><!-- doxytag: member="Collator::getFunctionalEquivalent" ref="a23ffda18b6d183b6c62b36718416b528" args="(const char *keyword, const Locale &amp;locale, UBool &amp;isAvailable, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classLocale.html">Locale</a> Collator::getFunctionalEquivalent </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>isAvailable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service. </p>
<p>If two locales return the same result, then collators instantiated for these locales will behave equivalently. The converse is not always true; two collators may in fact be equivalent, but return different results, due to internal details. The return result has no other meaning than that stated above, and implies nothing as to the relationship between the two locales. This is intended for use by applications who wish to cache collators, or otherwise reuse collators when possible. The functional equivalent may change over time. For more information, please see the <a href="http://icu-project.org/userguide/locale.html#services">Locales and Services</a> section of the ICU User Guide. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>keyword</em>&nbsp;</td><td>a particular keyword as enumerated by ucol_getKeywords. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the requested locale </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isAvailable</em>&nbsp;</td><td>reference to a fillin parameter that indicates whether the requested locale was 'available' to the collation service. A locale is defined as 'available' if it physically exists within the collation locale data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>reference to input-output error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the functionally equivalent collation locale, or the root locale upon error. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002313">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aa7f1d5f15b6fc722e8aace3160c52504"></a><!-- doxytag: member="Collator::getKeywords" ref="aa7f1d5f15b6fc722e8aace3160c52504" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* Collator::getKeywords </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a string enumerator of all possible keywords that are relevant to collation. </p>
<p>At this point, the only recognized keyword for this service is "collation". </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>input-output error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a string enumeration over locale strings. The caller is responsible for closing the result. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002310">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a1a1cc517b9c3b82cf8eea3956abdafc5"></a><!-- doxytag: member="Collator::getKeywordValues" ref="a1a1cc517b9c3b82cf8eea3956abdafc5" args="(const char *keyword, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* Collator::getKeywordValues </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a keyword, create a string enumeration of all values for that keyword that are currently in use. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>keyword</em>&nbsp;</td><td>a particular keyword as enumerated by ucol_getKeywords. If any other keyword is passed in, status is set to U_ILLEGAL_ARGUMENT_ERROR. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>input-output error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a string enumeration over collation keyword values, or NULL upon error. The caller is responsible for deleting the result. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002311">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a4be23583fa02f2074923858c2522acf8"></a><!-- doxytag: member="Collator::getKeywordValuesForLocale" ref="a4be23583fa02f2074923858c2522acf8" args="(const char *keyword, const Locale &amp;locale, UBool commonlyUsed, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* Collator::getKeywordValuesForLocale </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>keyword</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>commonlyUsed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a key and a locale, returns an array of string values in a preferred order that would make a difference. </p>
<p>These are all and only those values where the open (creation) of the service with the locale formed from the input locale plus input keyword and that value has different behavior than creation with the input locale alone. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>keyword</em>&nbsp;</td><td>one of the keys supported by this service. For now, only "collation" is supported. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the locale </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>commonlyUsed</em>&nbsp;</td><td>if set to true it will return only commonly used values with the given locale in preferred order. Otherwise, it will return all the available values for the locale. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU status </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a string enumeration over keyword values for the given key and the locale. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002312">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ab29b8994ac25fd1c5c9f5f58757c0d0c"></a><!-- doxytag: member="Collator::getLocale" ref="ab29b8994ac25fd1c5c9f5f58757c0d0c" args="(ULocDataLocaleType type, UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classLocale.html">Locale</a> Collator::getLocale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the locale of the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>can be either requested, valid or actual locale. For more information see the definition of ULocDataLocaleType in <a class="el" href="uloc_8h.html" title="C API: Locale.">uloc.h</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the error code status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>locale where the collation data lives. If the collator was instantiated from rules, locale is empty. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000189">Deprecated:</a></b></dt><dd>ICU 2.8 This API is under consideration for revision in ICU 3.0. </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a97cbec9ebe971ca9de1795e1dc3d63b0">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="af379292af58ae29650690a02c410bfe1"></a><!-- doxytag: member="Collator::getSortKey" ref="af379292af58ae29650690a02c410bfe1" args="(const UChar *source, int32_t sourceLength, uint8_t *result, int32_t resultLength) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t Collator::getSortKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the sort key as an array of bytes from an UChar buffer. </p>
<p>Sort key byte arrays are zero-terminated and can be compared using strcmp(). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>string to be processed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>length of string to be processed. If -1, the string is 0 terminated and length will be decided by the function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>buffer to store result in. If NULL, number of bytes needed will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>length of the result buffer. If if not enough the buffer will be filled to capacity. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of bytes needed for storing the sort key </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002328">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a9c185650b038aa1d64f01dbc6fdfbfbb">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ae524fd43a06d4429e2c76bef35874d4c"></a><!-- doxytag: member="Collator::getSortKey" ref="ae524fd43a06d4429e2c76bef35874d4c" args="(const UnicodeString &amp;source, uint8_t *result, int32_t resultLength) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t Collator::getSortKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the sort key as an array of bytes from an <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>. </p>
<p>Sort key byte arrays are zero-terminated and can be compared using strcmp(). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>string to be processed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>buffer to store result in. If NULL, number of bytes needed will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>length of the result buffer. If if not enough the buffer will be filled to capacity. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of bytes needed for storing the sort key </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002327">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a572804441daa3ff64895a75b87991369">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="abbd68b496b6063c5a09a35ce96e4ce93"></a><!-- doxytag: member="Collator::getStrength" ref="abbd68b496b6063c5a09a35ce96e4ce93" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">ECollationStrength</a> Collator::getStrength </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determines the minimum strength that will be use in comparison or transformation. </p>
<p>E.g. with strength == SECONDARY, the tertiary difference is ignored </p>
<p>E.g. with strength == PRIMARY, the secondary and tertiary difference are ignored. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current comparison level. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#a0337d30970c7b73a6885a31d6d7d2afa" title="Sets the minimum strength to be used in comparison or transformation.">Collator::setStrength</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000190">Deprecated:</a></b></dt><dd>ICU 2.6 Use getAttribute(UCOL_STRENGTH...) instead </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a4687629722826dd02625049df0dcff2f">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a905d1e33377b611a78ec63ae6c15d3c6"></a><!-- doxytag: member="Collator::getTailoredSet" ref="a905d1e33377b611a78ec63ae6c15d3c6" args="(UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeSet.html">UnicodeSet</a>* Collator::getTailoredSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an <a class="el" href="classUnicodeSet.html" title="A mutable set of Unicode characters and multicharacter strings.">UnicodeSet</a> that contains all the characters and sequences tailored in this collator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code of the operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to a <a class="el" href="classUnicodeSet.html" title="A mutable set of Unicode characters and multicharacter strings.">UnicodeSet</a> object containing all the code points and sequences that may sort differently than in the UCA. The object must be disposed of by using delete </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002325">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#a3c6f52fdf71f631fef79dd7b0a71b2f8">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="adff24c669022242ae00dd2c0c460bbf1"></a><!-- doxytag: member="Collator::getVariableTop" ref="adff24c669022242ae00dd2c0c460bbf1" args="(UErrorCode &amp;status) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t Collator::getVariableTop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the variable top value of a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<p>Lower 16 bits are undefined and should be ignored. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code (not changed by function). If error code is set, the return value is undefined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002324">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#ac064aa96a85249dbf7e51713952d63df">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a5884f921390751a8b6f831bd259a7b8d"></a><!-- doxytag: member="Collator::getVersion" ref="a5884f921390751a8b6f831bd259a7b8d" args="(UVersionInfo info) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Collator::getVersion </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uversion_8h.html#a61caef96ba86d8e86a4031925ea44e94">UVersionInfo</a>&nbsp;</td>
          <td class="paramname"> <em>info</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the version information for a <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>info</em>&nbsp;</td><td>the version # information, the result will be filled in </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002317">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a849f680b92692a38715b6b9fb67be7cf">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="aea0a4ed08d95791194c307f95e4cd8f2"></a><!-- doxytag: member="Collator::greater" ref="aea0a4ed08d95791194c307f95e4cd8f2" args="(const UnicodeString &amp;source, const UnicodeString &amp;target) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::greater </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience method for comparing two strings based on the collation rules. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the target string to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the first string is greater than the second one, according to the collation rules. false, otherwise. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">Collator::compare</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002303">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aa87d324253cf094dc48a7a1e9b7b6afa"></a><!-- doxytag: member="Collator::greaterOrEqual" ref="aa87d324253cf094dc48a7a1e9b7b6afa" args="(const UnicodeString &amp;source, const UnicodeString &amp;target) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::greaterOrEqual </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience method for comparing two strings based on the collation rules. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the source string to be compared with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>the target string to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the first string is greater than or equal to the second one, according to the collation rules. false, otherwise. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">Collator::compare</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002304">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a989efcbd6664efd0a8e738a2c1d3f357"></a><!-- doxytag: member="Collator::hashCode" ref="a989efcbd6664efd0a8e738a2c1d3f357" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t Collator::hashCode </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generates the hash code for the collation object. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002302">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a326891c5ae3763fab6e8e00b2289a413">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a0ddd04141f65b3f22e1f6d2bf4f53007"></a><!-- doxytag: member="Collator::operator!=" ref="a0ddd04141f65b3f22e1f6d2bf4f53007" args="(const Collator &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCollator.html">Collator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if "other" is not the same as "this". </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object to be compared </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is not the same as this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002293">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a5e9abbd44cc648351bcb398308a062a6"></a><!-- doxytag: member="Collator::operator==" ref="a5e9abbd44cc648351bcb398308a062a6" args="(const Collator &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCollator.html">Collator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if "other" is the same as "this". </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td><a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> object to be compared </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is the same as this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002292">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aabab7bd7531b5697256e7e7f5437faa1"></a><!-- doxytag: member="Collator::registerFactory" ref="aabab7bd7531b5697256e7e7f5437faa1" args="(CollatorFactory *toAdopt, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a> Collator::registerFactory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCollatorFactory.html">CollatorFactory</a> *&nbsp;</td>
          <td class="paramname"> <em>toAdopt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Register a new <a class="el" href="classCollatorFactory.html" title="A factory, used with registerFactory, the creates multiple collators and provides...">CollatorFactory</a>. </p>
<p>The factory will be adopted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>toAdopt</em>&nbsp;</td><td>the <a class="el" href="classCollatorFactory.html" title="A factory, used with registerFactory, the creates multiple collators and provides...">CollatorFactory</a> instance to be adopted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the in/out status code, no special meanings are assigned </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a registry key that can be used to unregister this collator </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002315">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a101e1f1b5eac8264ad5274b8e8bb9eed"></a><!-- doxytag: member="Collator::registerInstance" ref="a101e1f1b5eac8264ad5274b8e8bb9eed" args="(Collator *toAdopt, const Locale &amp;locale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a> Collator::registerInstance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCollator.html">Collator</a> *&nbsp;</td>
          <td class="paramname"> <em>toAdopt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Register a new <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>. </p>
<p>The collator will be adopted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>toAdopt</em>&nbsp;</td><td>the <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> instance to be adopted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the locale with which the collator will be associated </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the in/out status code, no special meanings are assigned </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a registry key that can be used to unregister this collator </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002314">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="aa97156a2a27c2e7fc0fccd0aee61de5a"></a><!-- doxytag: member="Collator::safeClone" ref="aa97156a2a27c2e7fc0fccd0aee61de5a" args="(void)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classCollator.html">Collator</a>* Collator::safeClone </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Thread safe cloning operation. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to the new clone, user should remove it. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002326">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#ab58b1bbb98649f03131fe8b4dcd7b109">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a132f1d7ad918bc1f4dcb956fd74ea808"></a><!-- doxytag: member="Collator::setAttribute" ref="a132f1d7ad918bc1f4dcb956fd74ea808" args="(UColAttribute attr, UColAttributeValue value, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Collator::setAttribute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucol_8h.html#a583fbe7fc4a850e2fcc692e766d2826c">UColAttribute</a>&nbsp;</td>
          <td class="paramname"> <em>attr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucol_8h.html#acc801048729e684bcabed328be85f77a">UColAttributeValue</a>&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Universal attribute setter. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>attr</em>&nbsp;</td><td>attribute type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>attribute value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>to indicate whether the operation went on smoothly or there were errors </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002319">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#ac1817cbafe92cd3184d8712a8b72d746">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ab480c30e10864f7c46cda00389bd2d34"></a><!-- doxytag: member="Collator::setLocales" ref="ab480c30e10864f7c46cda00389bd2d34" args="(const Locale &amp;requestedLocale, const Locale &amp;validLocale, const Locale &amp;actualLocale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Collator::setLocales </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>requestedLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>validLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>actualLocale</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used internally by registraton to define the requested and valid locales. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>requestedLocale</em>&nbsp;</td><td>the requested locale </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>validLocale</em>&nbsp;</td><td>the valid locale </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>actualLocale</em>&nbsp;</td><td>the actual locale </td></tr>
  </table>
  </dd>
</dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000215">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

<p>Reimplemented in <a class="el" href="classRuleBasedCollator.html#ac1aa2afb4a6b684d25fb89f7632ba7f9">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="a0337d30970c7b73a6885a31d6d7d2afa"></a><!-- doxytag: member="Collator::setStrength" ref="a0337d30970c7b73a6885a31d6d7d2afa" args="(ECollationStrength newStrength)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Collator::setStrength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCollator.html#a2872c36ad74fc1100331783afe6b38d5">ECollationStrength</a>&nbsp;</td>
          <td class="paramname"> <em>newStrength</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the minimum strength to be used in comparison or transformation. </p>
<p>Example of use: </p>
<pre>
  <div class="fragment"><pre class="fragment">  <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
  <a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>*myCollation = <a class="code" href="classCollator.html#a685bc906ba633d0d7653089d1f1a4dc5" title="Creates the Collator object for the current default locale.">Collator::createInstance</a>(Locale::US, status);
  <span class="keywordflow">if</span> (<a class="code" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE</a>(status)) <span class="keywordflow">return</span>;
  myCollation-&gt;<a class="code" href="classCollator.html#a0337d30970c7b73a6885a31d6d7d2afa" title="Sets the minimum strength to be used in comparison or transformation.">setStrength</a>(Collator::PRIMARY);
  <span class="comment">// result will be &quot;abc&quot; == &quot;ABC&quot;</span>
  <span class="comment">// tertiary differences will be ignored</span>
  Collator::ComparisonResult result = myCollation-&gt;<a class="code" href="classCollator.html#aca611b586fa47a756d2b29996f713182" title="The comparison function compares the character data stored in two different strings...">compare</a>(<span class="stringliteral">&quot;abc&quot;</span>, <span class="stringliteral">&quot;ABC&quot;</span>);
</pre></div>
 </pre> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classCollator.html#abbd68b496b6063c5a09a35ce96e4ce93" title="Determines the minimum strength that will be use in comparison or transformation...">Collator::getStrength</a> </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newStrength</em>&nbsp;</td><td>the new comparison level. </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000191">Deprecated:</a></b></dt><dd>ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a124ab414f1dc23cb3a5acc3f61e6a2d2">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="afc34e06d5d3675e6e6ad26a1ee303690"></a><!-- doxytag: member="Collator::setVariableTop" ref="afc34e06d5d3675e6e6ad26a1ee303690" args="(const uint32_t varTop, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Collator::setVariableTop </td>
          <td>(</td>
          <td class="paramtype">const uint32_t&nbsp;</td>
          <td class="paramname"> <em>varTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the variable top to a collation element value supplied. </p>
<p>Variable top is set to the upper 16 bits. Lower 16 bits are ignored. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>varTop</em>&nbsp;</td><td>CE value, as returned by setVariableTop or ucol)getVariableTop </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code (not changed by function) </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002323">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#ada7dd7ac546e91febadd47c68df9c102">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="adbf3ad5122866f9a16d39ca07779ddce"></a><!-- doxytag: member="Collator::setVariableTop" ref="adbf3ad5122866f9a16d39ca07779ddce" args="(const UnicodeString varTop, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t Collator::setVariableTop </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td>
          <td class="paramname"> <em>varTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the variable top to a collation element value of a string supplied. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>varTop</em>&nbsp;</td><td>an <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> size 1 or more (if contraction) of UChars to which the variable top should be set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code. If error code is set, the return value is undefined. Errors set by this function are: <br/>
 U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such a contraction<br/>
 U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a 32 bit value containing the value of the variable top in upper 16 bits. Lower 16 bits are undefined </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002322">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a828496b246626823fd96abe7dcf86782">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="ab6e4fc13e278beca8a39539dc326a913"></a><!-- doxytag: member="Collator::setVariableTop" ref="ab6e4fc13e278beca8a39539dc326a913" args="(const UChar *varTop, int32_t len, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t Collator::setVariableTop </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>varTop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the variable top to a collation element value of a string supplied. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>varTop</em>&nbsp;</td><td>one or more (if contraction) UChars to which the variable top should be set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of variable top string. If -1 it is considered to be zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code. If error code is set, the return value is undefined. Errors set by this function are: <br/>
 U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such a contraction<br/>
 U_PRIMARY_TOO_LONG_ERROR if the primary for the variable top has more than two bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a 32 bit value containing the value of the variable top in upper 16 bits. Lower 16 bits are undefined </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002321">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classRuleBasedCollator.html#a1049c65c7c51c9540ca91bae25bf9f54">RuleBasedCollator</a>.</p>

</div>
</div>
<a class="anchor" id="afb6f76b673673ddd0bbb2690d135fd56"></a><!-- doxytag: member="Collator::unregister" ref="afb6f76b673673ddd0bbb2690d135fd56" args="(URegistryKey key, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Collator::unregister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umisc_8h.html#ab5905d79ed3b979840cee1d5fd48b4fb">URegistryKey</a>&nbsp;</td>
          <td class="paramname"> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unregister a previously-registered <a class="el" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> or <a class="el" href="classCollatorFactory.html" title="A factory, used with registerFactory, the creates multiple collators and provides...">CollatorFactory</a> using the key returned from the register call. </p>
<p>Key becomes invalid after a successful call and should not be used again. The object corresponding to the key will be deleted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the registry key returned by a previous call to registerInstance </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the in/out status code, no special meanings are assigned </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the collator for the key was successfully unregistered </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002316">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="coll_8h_source.html">coll.h</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>