Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 1036

icu-doc-58.2-3.mga6.noarch.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ICU 58.2: usearch.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_3c42bef9a3e7804b3d74ebb2809ebf86.html">i18n</a></li><li class="navelem"><a class="el" href="dir_fa4147b4d9cbc9ae7619e21b25239322.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">usearch.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: StringSearch.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ucol_8h_source.html">unicode/ucol.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ucoleitr_8h_source.html">unicode/ucoleitr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="ubrk_8h_source.html">unicode/ubrk.h</a>&quot;</code><br />
</div>
<p><a href="usearch_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service. ">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ab66c48ad34ba3832680f23da3e0f70aa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa">USEARCH_DONE</a>&#160;&#160;&#160;-1</td></tr>
<tr class="memdesc:ab66c48ad34ba3832680f23da3e0f70aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all.  <a href="#ab66c48ad34ba3832680f23da3e0f70aa">More...</a><br /></td></tr>
<tr class="separator:ab66c48ad34ba3832680f23da3e0f70aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ab244c09051ecef7e477be6f3e247796d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a></td></tr>
<tr class="memdesc:ab244c09051ecef7e477be6f3e247796d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure for searching.  <a href="#ab244c09051ecef7e477be6f3e247796d">More...</a><br /></td></tr>
<tr class="separator:ab244c09051ecef7e477be6f3e247796d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:aa382f146f1968a9d1dc182100b23ac03"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a> { <a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03a5ff7dd21e97fe37e8c0831e01109ac4d">USEARCH_OVERLAP</a> = 0, 
<a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03a37b8d3d23099f977933aba4ee4eeff4c">USEARCH_CANONICAL_MATCH</a> = 1, 
<a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03a5913e7fe1dd4718633825ffc3c7eb58d">USEARCH_ELEMENT_COMPARISON</a> = 2, 
<a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03ab3f54e23fa62647a4d92ab08780f90fe">USEARCH_ATTRIBUTE_COUNT</a> = 3
 }</td></tr>
<tr class="separator:aa382f146f1968a9d1dc182100b23ac03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbe777746540a229c0a2ff3323e292d1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a> { <br />
&#160;&#160;<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1a4195142bbaf07c3e7503a4017deab57b">USEARCH_DEFAULT</a> = -1, 
<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1a5c12e5024dc8193f02f5961d9997ecc5">USEARCH_OFF</a>, 
<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1a683745df041ae94d9b0450c08d030fb7">USEARCH_ON</a>, 
<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1aaaa3f2ca0131d2dac6cda0af4c53903e">USEARCH_STANDARD_ELEMENT_COMPARISON</a>, 
<br />
&#160;&#160;<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1ad657b25a9167aad29f36acdbcb65d155">USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD</a>, 
<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1adfcf458c299700c875bbb28ca558506f">USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD</a>, 
<a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1a17a134c110bf6baf221c3e5c95fb5cc6">USEARCH_ATTRIBUTE_VALUE_COUNT</a>
<br />
 }</td></tr>
<tr class="separator:afbe777746540a229c0a2ff3323e292d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a25915409c9af820aef82990b82b401d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a25915409c9af820aef82990b82b401d7">usearch_open</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternlength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t textlength, const char *locale, <a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *breakiter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a25915409c9af820aef82990b82b401d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creating a search iterator data struct using the argument locale language rule set.  <a href="#a25915409c9af820aef82990b82b401d7">More...</a><br /></td></tr>
<tr class="separator:a25915409c9af820aef82990b82b401d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cfb0c54ef2b4bf100ce5f1febf769cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a5cfb0c54ef2b4bf100ce5f1febf769cc">usearch_openFromCollator</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternlength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t textlength, const <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *collator, <a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *breakiter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5cfb0c54ef2b4bf100ce5f1febf769cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creating a search iterator data struct using the argument collator language rule set.  <a href="#a5cfb0c54ef2b4bf100ce5f1febf769cc">More...</a><br /></td></tr>
<tr class="separator:a5cfb0c54ef2b4bf100ce5f1febf769cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a618a3f90394cecd1f76aaee4cc1b4c9d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a618a3f90394cecd1f76aaee4cc1b4c9d">usearch_close</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *searchiter)</td></tr>
<tr class="memdesc:a618a3f90394cecd1f76aaee4cc1b4c9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroying and cleaning up the search iterator data struct.  <a href="#a618a3f90394cecd1f76aaee4cc1b4c9d">More...</a><br /></td></tr>
<tr class="separator:a618a3f90394cecd1f76aaee4cc1b4c9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1291f11a16b4b1090eb7029e4c51c70a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a1291f11a16b4b1090eb7029e4c51c70a">usearch_setOffset</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a1291f11a16b4b1090eb7029e4c51c70a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current position in the text string which the next search will start from.  <a href="#a1291f11a16b4b1090eb7029e4c51c70a">More...</a><br /></td></tr>
<tr class="separator:a1291f11a16b4b1090eb7029e4c51c70a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5913a0eff26b126630d802195fa4622"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622">usearch_getOffset</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:ad5913a0eff26b126630d802195fa4622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current index in the string text being searched.  <a href="#ad5913a0eff26b126630d802195fa4622">More...</a><br /></td></tr>
<tr class="separator:ad5913a0eff26b126630d802195fa4622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac983c4347f0d3d0179d67f0e9ba47bd0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ac983c4347f0d3d0179d67f0e9ba47bd0">usearch_setAttribute</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a> attribute, <a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a> value, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ac983c4347f0d3d0179d67f0e9ba47bd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the text searching attributes located in the enum USearchAttribute with values from the enum USearchAttributeValue.  <a href="#ac983c4347f0d3d0179d67f0e9ba47bd0">More...</a><br /></td></tr>
<tr class="separator:ac983c4347f0d3d0179d67f0e9ba47bd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22948a4f2340979d38e145e13efb7a86"><td class="memItemLeft" align="right" valign="top"><a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a22948a4f2340979d38e145e13efb7a86">usearch_getAttribute</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a> attribute)</td></tr>
<tr class="memdesc:a22948a4f2340979d38e145e13efb7a86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the text searching attributes.  <a href="#a22948a4f2340979d38e145e13efb7a86">More...</a><br /></td></tr>
<tr class="separator:a22948a4f2340979d38e145e13efb7a86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87337f2e0925028965f9f4ff72463eab"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a87337f2e0925028965f9f4ff72463eab">usearch_getMatchedStart</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:a87337f2e0925028965f9f4ff72463eab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index to the match in the text string that was searched.  <a href="#a87337f2e0925028965f9f4ff72463eab">More...</a><br /></td></tr>
<tr class="separator:a87337f2e0925028965f9f4ff72463eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a88cb2386508803670df932384ed195"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a4a88cb2386508803670df932384ed195">usearch_getMatchedLength</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:a4a88cb2386508803670df932384ed195"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of text in the string which matches the search pattern.  <a href="#a4a88cb2386508803670df932384ed195">More...</a><br /></td></tr>
<tr class="separator:a4a88cb2386508803670df932384ed195"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19a7079e52d937fc2ea7fe5e06a2c563"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a19a7079e52d937fc2ea7fe5e06a2c563">usearch_getMatchedText</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a19a7079e52d937fc2ea7fe5e06a2c563"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the text that was matched by the most recent call to <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>, or <code>usearch_last</code>.  <a href="#a19a7079e52d937fc2ea7fe5e06a2c563">More...</a><br /></td></tr>
<tr class="separator:a19a7079e52d937fc2ea7fe5e06a2c563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86d42a1e90bb714a38a314d5bb77cda5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a86d42a1e90bb714a38a314d5bb77cda5">usearch_setBreakIterator</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *breakiter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a86d42a1e90bb714a38a314d5bb77cda5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the BreakIterator that will be used to restrict the points at which matches are detected.  <a href="#a86d42a1e90bb714a38a314d5bb77cda5">More...</a><br /></td></tr>
<tr class="separator:a86d42a1e90bb714a38a314d5bb77cda5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1386c96d1215f380a0678bf368efbbba"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a1386c96d1215f380a0678bf368efbbba">usearch_getBreakIterator</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:a1386c96d1215f380a0678bf368efbbba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the BreakIterator that is used to restrict the points at which matches are detected.  <a href="#a1386c96d1215f380a0678bf368efbbba">More...</a><br /></td></tr>
<tr class="separator:a1386c96d1215f380a0678bf368efbbba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09c1c5d4ea8b69ce32993dff6426a386"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a09c1c5d4ea8b69ce32993dff6426a386">usearch_setText</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t textlength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a09c1c5d4ea8b69ce32993dff6426a386"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the string text to be searched.  <a href="#a09c1c5d4ea8b69ce32993dff6426a386">More...</a><br /></td></tr>
<tr class="separator:a09c1c5d4ea8b69ce32993dff6426a386"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c0acb3936f46b566e39874e6f063f1b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a4c0acb3936f46b566e39874e6f063f1b">usearch_getText</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t *length)</td></tr>
<tr class="memdesc:a4c0acb3936f46b566e39874e6f063f1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the string text to be searched.  <a href="#a4c0acb3936f46b566e39874e6f063f1b">More...</a><br /></td></tr>
<tr class="separator:a4c0acb3936f46b566e39874e6f063f1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6c5c26c83f1797d7d60befad91ca2d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ac6c5c26c83f1797d7d60befad91ca2d3">usearch_getCollator</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:ac6c5c26c83f1797d7d60befad91ca2d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the collator used for the language rules.  <a href="#ac6c5c26c83f1797d7d60befad91ca2d3">More...</a><br /></td></tr>
<tr class="separator:ac6c5c26c83f1797d7d60befad91ca2d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac54be8b9a44d22ec6ea5d53f3cc5d7c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ac54be8b9a44d22ec6ea5d53f3cc5d7c5">usearch_setCollator</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, const <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *collator, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ac54be8b9a44d22ec6ea5d53f3cc5d7c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the collator used for the language rules.  <a href="#ac54be8b9a44d22ec6ea5d53f3cc5d7c5">More...</a><br /></td></tr>
<tr class="separator:ac54be8b9a44d22ec6ea5d53f3cc5d7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2d53cd40c636eb0da13b891e4a84dbb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#aa2d53cd40c636eb0da13b891e4a84dbb">usearch_setPattern</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternlength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aa2d53cd40c636eb0da13b891e4a84dbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pattern used for matching.  <a href="#aa2d53cd40c636eb0da13b891e4a84dbb">More...</a><br /></td></tr>
<tr class="separator:aa2d53cd40c636eb0da13b891e4a84dbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ffeb4ed9b997387051c1705b2b32858"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a1ffeb4ed9b997387051c1705b2b32858">usearch_getPattern</a> (const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t *length)</td></tr>
<tr class="memdesc:a1ffeb4ed9b997387051c1705b2b32858"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the search pattern.  <a href="#a1ffeb4ed9b997387051c1705b2b32858">More...</a><br /></td></tr>
<tr class="separator:a1ffeb4ed9b997387051c1705b2b32858"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad59a7f4746faf28c98fee8473e0353d4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4">usearch_first</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ad59a7f4746faf28c98fee8473e0353d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the first index at which the string text matches the search pattern.  <a href="#ad59a7f4746faf28c98fee8473e0353d4">More...</a><br /></td></tr>
<tr class="separator:ad59a7f4746faf28c98fee8473e0353d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32c4c29b24f1f2ce0a3dc4e90c1a0b30"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a32c4c29b24f1f2ce0a3dc4e90c1a0b30">usearch_following</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a32c4c29b24f1f2ce0a3dc4e90c1a0b30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the first index equal or greater than <code>position</code> at which the string text matches the search pattern.  <a href="#a32c4c29b24f1f2ce0a3dc4e90c1a0b30">More...</a><br /></td></tr>
<tr class="separator:a32c4c29b24f1f2ce0a3dc4e90c1a0b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad61fadd096cd28a454f68fa117a24cb"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#aad61fadd096cd28a454f68fa117a24cb">usearch_last</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aad61fadd096cd28a454f68fa117a24cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last index in the target text at which it matches the search pattern.  <a href="#aad61fadd096cd28a454f68fa117a24cb">More...</a><br /></td></tr>
<tr class="separator:aad61fadd096cd28a454f68fa117a24cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3cd326f313fdc57bfe46f906a33f6f1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#ac3cd326f313fdc57bfe46f906a33f6f1">usearch_preceding</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ac3cd326f313fdc57bfe46f906a33f6f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the first index less than <code>position</code> at which the string text matches the search pattern.  <a href="#ac3cd326f313fdc57bfe46f906a33f6f1">More...</a><br /></td></tr>
<tr class="separator:ac3cd326f313fdc57bfe46f906a33f6f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51f8b08f582cb956d950cdd5098e93cf"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a51f8b08f582cb956d950cdd5098e93cf">usearch_next</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a51f8b08f582cb956d950cdd5098e93cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of the next point at which the string text matches the search pattern, starting from the current position.  <a href="#a51f8b08f582cb956d950cdd5098e93cf">More...</a><br /></td></tr>
<tr class="separator:a51f8b08f582cb956d950cdd5098e93cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6be0c1c2f412c0ae13cb9c7c1796d7a4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a6be0c1c2f412c0ae13cb9c7c1796d7a4">usearch_previous</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a6be0c1c2f412c0ae13cb9c7c1796d7a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of the previous point at which the string text matches the search pattern, starting at the current position.  <a href="#a6be0c1c2f412c0ae13cb9c7c1796d7a4">More...</a><br /></td></tr>
<tr class="separator:a6be0c1c2f412c0ae13cb9c7c1796d7a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52484e482e408ddc091cc43b0d1decd9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a52484e482e408ddc091cc43b0d1decd9">usearch_reset</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch)</td></tr>
<tr class="memdesc:a52484e482e408ddc091cc43b0d1decd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the iteration.  <a href="#a52484e482e408ddc091cc43b0d1decd9">More...</a><br /></td></tr>
<tr class="separator:a52484e482e408ddc091cc43b0d1decd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a429ec33f40f29f25d41ce8a1f7513465"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#a429ec33f40f29f25d41ce8a1f7513465">usearch_search</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t startIdx, int32_t *matchStart, int32_t *matchLimit, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a429ec33f40f29f25d41ce8a1f7513465"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple forward search for the pattern, starting at a specified index, and using using a default set search options.  <a href="#a429ec33f40f29f25d41ce8a1f7513465">More...</a><br /></td></tr>
<tr class="separator:a429ec33f40f29f25d41ce8a1f7513465"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafad5d71a67ca39ba1886fbae3659a5b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="usearch_8h.html#aafad5d71a67ca39ba1886fbae3659a5b">usearch_searchBackwards</a> (<a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *strsrch, int32_t startIdx, int32_t *matchStart, int32_t *matchLimit, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aafad5d71a67ca39ba1886fbae3659a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple backwards search for the pattern, starting at a specified index, and using using a default set search options.  <a href="#aafad5d71a67ca39ba1886fbae3659a5b">More...</a><br /></td></tr>
<tr class="separator:aafad5d71a67ca39ba1886fbae3659a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>C API: StringSearch. </p>
<p>C Apis for an engine that provides language-sensitive text searching based on the comparison rules defined in a <code>UCollator</code> data struct, see <code><a class="el" href="ucol_8h.html" title="C API: Collator. ">ucol.h</a></code>. This ensures that language eccentricity can be handled, e.g. for the German collator, characters &szlig; and SS will be matched if case is chosen to be ignored. See the <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm">"ICU Collation Design Document"</a> for more information. </p>
<p>The implementation may use a linear search or a modified form of the Boyer-Moore search; for more information on the latter see <a href="http://icu-project.org/docs/papers/efficient_text_searching_in_java.html">"Efficient Text Searching in Java"</a>, published in <em>Java Report</em> in February, 1999. </p>
<p>There are 2 match options for selection:<br />
 Let S' be the sub-string of a text string S between the offsets start and end &lt;start, end&gt;. <br />
 A pattern string P matches a text string S at the offsets &lt;start, end&gt; if </p><pre> 
option 1. Some canonical equivalent of P matches some canonical equivalent 
          of S'
option 2. P matches S' and if P starts or ends with a combining mark, 
          there exists no non-ignorable combining mark before or after S' 
          in S respectively. 
</pre><p> Option 2. will be the default. </p>
<p>This search has APIs similar to that of other text iteration mechanisms such as the break iterators in <code><a class="el" href="ubrk_8h.html" title="C API: BreakIterator. ">ubrk.h</a></code>. Using these APIs, it is easy to scan through text looking for all occurances of a given pattern. This search iterator allows changing of direction by calling a <code>reset</code> followed by a <code>next</code> or <code>previous</code>. Though a direction change can occur without calling <code>reset</code> first, this operation comes with some speed penalty. Generally, match results in the forward direction will match the result matches in the backwards direction in the reverse order </p>
<p><code><a class="el" href="usearch_8h.html" title="C API: StringSearch. ">usearch.h</a></code> provides APIs to specify the starting position within the text string to be searched, e.g. <code>usearch_setOffset</code>, <code>usearch_preceding</code> and <code>usearch_following</code>. Since the starting position will be set as it is specified, please take note that there are some dangerous positions which the search may render incorrect results: </p><ul>
<li>
The midst of a substring that requires normalization. </li>
<li>
If the following match is to be found, the position should not be the second character which requires to be swapped with the preceding character. Vice versa, if the preceding match is to be found, position to search from should not be the first character which requires to be swapped with the next character. E.g certain Thai and Lao characters require swapping. </li>
<li>
If a following pattern match is to be found, any position within a contracting sequence except the first will fail. Vice versa if a preceding pattern match is to be found, a invalid starting point would be any character within a contracting sequence except the last. </li>
</ul>
<p>A breakiterator can be used if only matches at logical breaks are desired. Using a breakiterator will only give you results that exactly matches the boundaries given by the breakiterator. For instance the pattern "e" will not be found in the string "\u00e9" if a character break iterator is used. </p>
<p>Options are provided to handle overlapping matches. E.g. In English, overlapping matches produces the result 0 and 2 for the pattern "abab" in the text "ababab", where else mutually exclusive matches only produce the result of 0. </p>
<p>Options are also provided to implement "asymmetric search" as described in <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">UTS #10 Unicode Collation Algorithm</a>, specifically the USearchAttribute USEARCH_ELEMENT_COMPARISON and its values. </p>
<p>Though collator attributes will be taken into consideration while performing matches, there are no APIs here for setting and getting the attributes. These attributes can be set by getting the collator from <code>usearch_getCollator</code> and using the APIs in <code><a class="el" href="ucol_8h.html" title="C API: Collator. ">ucol.h</a></code>. Lastly to update String Search to the new collator attributes, <a class="el" href="usearch_8h.html#a52484e482e408ddc091cc43b0d1decd9" title="Reset the iteration. ">usearch_reset()</a> has to be called. </p>
<p>Restriction: <br />
 Currently there are no composite characters that consists of a character with combining class &gt; 0 before a character with combining class == 0. However, if such a character exists in the future, the search mechanism does not guarantee the results for option 1.</p>
<p>Example of use:<br />
 </p><pre><code>
char *tgtstr = "The quick brown fox jumped over the lazy fox";
char *patstr = "fox";
UChar target[64];
UChar pattern[16];
UErrorCode status = U_ZERO_ERROR;
u_uastrcpy(target, tgtstr);
u_uastrcpy(pattern, patstr);</code></pre><pre><code>UStringSearch *search = usearch_open(pattern, -1, target, -1, "en_US", 
                                 NULL, &amp;status);
if (<a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success? ">U_SUCCESS(status)</a>) {
    for (int pos = usearch_first(search, &amp;status); 
         pos != USEARCH_DONE; 
         pos = usearch_next(search, &amp;status))
    {
        printf("Found match at %d pos, length is %d\n", pos, 
                                       usearch_getMatchLength(search));
    }
}</code></pre><pre><code>usearch_close(search);
</code></pre> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable005510">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition in file <a class="el" href="usearch_8h_source.html">usearch.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ab66c48ad34ba3832680f23da3e0f70aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define USEARCH_DONE&#160;&#160;&#160;-1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005511">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="usearch_8h_source.html#l00147">147</a> of file <a class="el" href="usearch_8h_source.html">usearch.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ab244c09051ecef7e477be6f3e247796d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Data structure for searching. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005513">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="usearch_8h_source.html#l00158">158</a> of file <a class="el" href="usearch_8h_source.html">usearch.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="aa382f146f1968a9d1dc182100b23ac03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005514">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aa382f146f1968a9d1dc182100b23ac03a5ff7dd21e97fe37e8c0831e01109ac4d"></a>USEARCH_OVERLAP&#160;</td><td class="fielddoc">
<p>Option for overlapping matches. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005541">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa382f146f1968a9d1dc182100b23ac03a37b8d3d23099f977933aba4ee4eeff4c"></a>USEARCH_CANONICAL_MATCH&#160;</td><td class="fielddoc">
<p>Option for canonical matches; option 1 in header documentation. </p>
<p>The default value will be USEARCH_OFF. Note: Setting this option to USEARCH_ON currently has no effect on search behavior, and this option is deprecated. Instead, to control canonical match behavior, you must set UCOL_NORMALIZATION_MODE appropriately (to UCOL_OFF or UCOL_ON) in the UCollator used by the UStringSearch object. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a5cfb0c54ef2b4bf100ce5f1febf769cc" title="Creating a search iterator data struct using the argument collator language rule set. ">usearch_openFromCollator</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ac6c5c26c83f1797d7d60befad91ca2d3" title="Gets the collator used for the language rules. ">usearch_getCollator</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ac54be8b9a44d22ec6ea5d53f3cc5d7c5" title="Sets the collator used for the language rules. ">usearch_setCollator</a> </dd>
<dd>
<a class="el" href="ucol_8h.html#af96cc7dc7da7981d2d12356b104e058a" title="Universal attribute getter. ">ucol_getAttribute</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000432">Deprecated:</a></b></dt><dd>ICU 53 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa382f146f1968a9d1dc182100b23ac03a5913e7fe1dd4718633825ffc3c7eb58d"></a>USEARCH_ELEMENT_COMPARISON&#160;</td><td class="fielddoc">
<p>Option to control how collation elements are compared. </p>
<p>The default value will be USEARCH_STANDARD_ELEMENT_COMPARISON. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable005542">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aa382f146f1968a9d1dc182100b23ac03ab3f54e23fa62647a4d92ab08780f90fe"></a>USEARCH_ATTRIBUTE_COUNT&#160;</td><td class="fielddoc">
<p>One more than the highest normal USearchAttribute value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000433">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="usearch_8h_source.html#l00163">163</a> of file <a class="el" href="usearch_8h_source.html">usearch.h</a>.</p>

</div>
</div>
<a class="anchor" id="afbe777746540a229c0a2ff3323e292d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005515">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1a4195142bbaf07c3e7503a4017deab57b"></a>USEARCH_DEFAULT&#160;</td><td class="fielddoc">
<p>Default value for any USearchAttribute. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005543">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1a5c12e5024dc8193f02f5961d9997ecc5"></a>USEARCH_OFF&#160;</td><td class="fielddoc">
<p>Value for USEARCH_OVERLAP and USEARCH_CANONICAL_MATCH. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005544">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1a683745df041ae94d9b0450c08d030fb7"></a>USEARCH_ON&#160;</td><td class="fielddoc">
<p>Value for USEARCH_OVERLAP and USEARCH_CANONICAL_MATCH. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005545">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1aaaa3f2ca0131d2dac6cda0af4c53903e"></a>USEARCH_STANDARD_ELEMENT_COMPARISON&#160;</td><td class="fielddoc">
<p>Value (default) for USEARCH_ELEMENT_COMPARISON; standard collation element comparison at the specified collator strength. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005546">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1ad657b25a9167aad29f36acdbcb65d155"></a>USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD&#160;</td><td class="fielddoc">
<p>Value for USEARCH_ELEMENT_COMPARISON; collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. </p>
<p>Collation elements in the pattern that have the base weight for the specified strength are treated as "wildcards" that match an element with any other weight at that collation level in the searched text. For example, with a secondary-strength English collator, a plain 'e' in the pattern will match a plain e or an e with any diacritic in the searched text, but an e with diacritic in the pattern will only match an e with the same diacritic in the searched text.</p>
<p>This supports "asymmetric search" as described in <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">UTS #10 Unicode Collation Algorithm</a>.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005547">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1adfcf458c299700c875bbb28ca558506f"></a>USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD&#160;</td><td class="fielddoc">
<p>Value for USEARCH_ELEMENT_COMPARISON. </p>
<p>collation element comparison is modified to effectively provide behavior between the specified strength and strength - 1. Collation elements in either the pattern or the searched text that have the base weight for the specified strength are treated as "wildcards" that match an element with any other weight at that collation level. For example, with a secondary-strength English collator, a plain 'e' in the pattern will match a plain e or an e with any diacritic in the searched text, but an e with diacritic in the pattern will only match an e with the same diacritic or a plain e in the searched text.</p>
<p>This option is similar to "asymmetric search" as described in <a href="http://www.unicode.org/reports/tr10/#Asymmetric_Search">UTS #10 Unicode Collation Algorithm&lt;/a, but also allows unmarked characters in the searched text to match marked or unmarked versions of that character in the pattern.  stable 5548. </a></p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="afbe777746540a229c0a2ff3323e292d1a17a134c110bf6baf221c3e5c95fb5cc6"></a>USEARCH_ATTRIBUTE_VALUE_COUNT&#160;</td><td class="fielddoc">
<p>One more than the highest normal USearchAttributeValue value. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000434">Deprecated:</a></b></dt><dd>ICU 58 The numeric value may change over time, see ICU ticket #12420. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="usearch_8h_source.html#l00205">205</a> of file <a class="el" href="usearch_8h_source.html">usearch.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a618a3f90394cecd1f76aaee4cc1b4c9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>searchiter</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroying and cleaning up the search iterator data struct. </p>
<p>If a collator is created in <code>usearch_open</code>, it will be destroyed here. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">searchiter</td><td>data struct to clean up </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005518">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ad59a7f4746faf28c98fee8473e0353d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_first </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the first index at which the string text matches the search pattern. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The character index of the first match, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005534">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a32c4c29b24f1f2ce0a3dc4e90c1a0b30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_following </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the first index equal or greater than <code>position</code> at which the string text matches the search pattern. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code> </p>
<p>Search positions that may render incorrect results are highlighted in the header comments. If position is less than or greater than the text range for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">position</td><td>to start the search at </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The character index of the first match following <code>pos</code>, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005535">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a22948a4f2340979d38e145e13efb7a86"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a> usearch_getAttribute </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a>&#160;</td>
          <td class="paramname"><em>attribute</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the text searching attributes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">attribute</td><td>text attribute to be retrieve </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>text attribute value </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ac983c4347f0d3d0179d67f0e9ba47bd0" title="Sets the text searching attributes located in the enum USearchAttribute with values from the enum USe...">usearch_setAttribute</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005522">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a1386c96d1215f380a0678bf368efbbba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a>* usearch_getBreakIterator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the BreakIterator that is used to restrict the points at which matches are detected. </p>
<p>This will be the same object that was passed to the constructor or to <code>usearch_setBreakIterator</code>. Note that <code>NULL</code> is a legal value; it means that break detection should not be attempted. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>break iterator used </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a86d42a1e90bb714a38a314d5bb77cda5" title="Set the BreakIterator that will be used to restrict the points at which matches are detected...">usearch_setBreakIterator</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005527">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ac6c5c26c83f1797d7d60befad91ca2d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a>* usearch_getCollator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the collator used for the language rules. </p>
<p>Deleting the returned <code>UCollator</code> before calling <code>usearch_close</code> would cause the string search to fail. <code>usearch_close</code> will delete the collator if this search owns it. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>collator </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005530">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a4a88cb2386508803670df932384ed195"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_getMatchedLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the length of text in the string which matches the search pattern. </p>
<p>This call returns a valid result only after a successful call to <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>, or <code>usearch_last</code>. Just after construction, or after a searching method returns <code>USEARCH_DONE</code>, this method will return 0. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the match in the string text, or 0 if there is no match currently. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4" title="Returns the first index at which the string text matches the search pattern. ">usearch_first</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a51f8b08f582cb956d950cdd5098e93cf" title="Returns the index of the next point at which the string text matches the search pattern, starting from the current position. ">usearch_next</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a6be0c1c2f412c0ae13cb9c7c1796d7a4" title="Returns the index of the previous point at which the string text matches the search pattern...">usearch_previous</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#aad61fadd096cd28a454f68fa117a24cb" title="Returns the last index in the target text at which it matches the search pattern. ...">usearch_last</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005524">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a87337f2e0925028965f9f4ff72463eab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_getMatchedStart </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index to the match in the text string that was searched. </p>
<p>This call returns a valid result only after a successful call to <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>, or <code>usearch_last</code>. Just after construction, or after a searching method returns <code>USEARCH_DONE</code>, this method will return <code>USEARCH_DONE</code>. </p>
<p>Use <code>usearch_getMatchedLength</code> to get the matched string length. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>index to a substring within the text string that is being searched. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4" title="Returns the first index at which the string text matches the search pattern. ">usearch_first</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a51f8b08f582cb956d950cdd5098e93cf" title="Returns the index of the next point at which the string text matches the search pattern, starting from the current position. ">usearch_next</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a6be0c1c2f412c0ae13cb9c7c1796d7a4" title="Returns the index of the previous point at which the string text matches the search pattern...">usearch_previous</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#aad61fadd096cd28a454f68fa117a24cb" title="Returns the last index in the target text at which it matches the search pattern. ...">usearch_last</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005523">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a19a7079e52d937fc2ea7fe5e06a2c563"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_getMatchedText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>resultCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the text that was matched by the most recent call to <code>usearch_first</code>, <code>usearch_next</code>, <code>usearch_previous</code>, or <code>usearch_last</code>. </p>
<p>If the iterator is not pointing at a valid match (e.g. just after construction or after <code>USEARCH_DONE</code> has been returned, returns an empty string. If result is not large enough to store the matched text, result will be filled with the partial text and an U_BUFFER_OVERFLOW_ERROR will be returned in status. result will be null-terminated whenever possible. If the buffer fits the matched text exactly, a null-termination is not possible, then a U_STRING_NOT_TERMINATED_ERROR set in status. Pre-flighting can be either done with length = 0 or the API <code>usearch_getMatchLength</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">result</td><td>UChar buffer to store the matched string </td></tr>
    <tr><td class="paramname">resultCapacity</td><td>length of the result buffer </td></tr>
    <tr><td class="paramname">status</td><td>error returned if result is not large enough </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>exact length of the matched text, not counting the null-termination </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4" title="Returns the first index at which the string text matches the search pattern. ">usearch_first</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a51f8b08f582cb956d950cdd5098e93cf" title="Returns the index of the next point at which the string text matches the search pattern, starting from the current position. ">usearch_next</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#a6be0c1c2f412c0ae13cb9c7c1796d7a4" title="Returns the index of the previous point at which the string text matches the search pattern...">usearch_previous</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#aad61fadd096cd28a454f68fa117a24cb" title="Returns the last index in the target text at which it matches the search pattern. ...">usearch_last</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005525">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ad5913a0eff26b126630d802195fa4622"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_getOffset </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the current index in the string text being searched. </p>
<p>If the iteration has gone past the end of the text (or past the beginning for a backwards search), <code>USEARCH_DONE</code> is returned. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005520">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a1ffeb4ed9b997387051c1705b2b32858"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* usearch_getPattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the search pattern. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">length</td><td>return length of the pattern, -1 indicates that the pattern is null-terminated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pattern string </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005533">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a4c0acb3936f46b566e39874e6f063f1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* usearch_getText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the string text to be searched. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">length</td><td>returned string text length </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string text </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a09c1c5d4ea8b69ce32993dff6426a386" title="Set the string text to be searched. ">usearch_setText</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005529">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="aad61fadd096cd28a454f68fa117a24cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_last </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the last index in the target text at which it matches the search pattern. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the first match, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005536">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a51f8b08f582cb956d950cdd5098e93cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index of the next point at which the string text matches the search pattern, starting from the current position. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the next match after the current position, or <code>USEARCH_DONE</code> if there are no more matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4" title="Returns the first index at which the string text matches the search pattern. ">usearch_first</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005538">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a25915409c9af820aef82990b82b401d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a>* usearch_open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>patternlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>textlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *&#160;</td>
          <td class="paramname"><em>breakiter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creating a search iterator data struct using the argument locale language rule set. </p>
<p>A collator will be created in the process, which will be owned by this search and will be deleted in <code>usearch_close</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pattern</td><td>for matching </td></tr>
    <tr><td class="paramname">patternlength</td><td>length of the pattern, -1 for null-termination </td></tr>
    <tr><td class="paramname">text</td><td>text string </td></tr>
    <tr><td class="paramname">textlength</td><td>length of the text string, -1 for null-termination </td></tr>
    <tr><td class="paramname">locale</td><td>name of locale for the rules to be used </td></tr>
    <tr><td class="paramname">breakiter</td><td>A BreakIterator that will be used to restrict the points at which matches are detected. If a match is found, but the match's start or end index is not a boundary as determined by the <code>BreakIterator</code>, the match will be rejected and another will be searched for. If this parameter is <code>NULL</code>, no break detection is attempted. </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs. If pattern or text is NULL, or if patternlength or textlength is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>search iterator data structure, or NULL if there is an error. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005516">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a5cfb0c54ef2b4bf100ce5f1febf769cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a>* usearch_openFromCollator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>patternlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>textlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *&#160;</td>
          <td class="paramname"><em>collator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *&#160;</td>
          <td class="paramname"><em>breakiter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creating a search iterator data struct using the argument collator language rule set. </p>
<p>Note, user retains the ownership of this collator, thus the responsibility of deletion lies with the user. NOTE: string search cannot be instantiated from a collator that has collate digits as numbers (CODAN) turned on. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pattern</td><td>for matching </td></tr>
    <tr><td class="paramname">patternlength</td><td>length of the pattern, -1 for null-termination </td></tr>
    <tr><td class="paramname">text</td><td>text string </td></tr>
    <tr><td class="paramname">textlength</td><td>length of the text string, -1 for null-termination </td></tr>
    <tr><td class="paramname">collator</td><td>used for the language rules </td></tr>
    <tr><td class="paramname">breakiter</td><td>A BreakIterator that will be used to restrict the points at which matches are detected. If a match is found, but the match's start or end index is not a boundary as determined by the <code>BreakIterator</code>, the match will be rejected and another will be searched for. If this parameter is <code>NULL</code>, no break detection is attempted. </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs. If collator, pattern or text is NULL, or if patternlength or textlength is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>search iterator data structure, or NULL if there is an error. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005517">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ac3cd326f313fdc57bfe46f906a33f6f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_preceding </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the first index less than <code>position</code> at which the string text matches the search pattern. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code> </p>
<p>Search positions that may render incorrect results are highlighted in the header comments. If position is less than or greater than the text range for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned. </p>
<p>When <code>USEARCH_OVERLAP</code> option is off, the last index of the result match is always less than <code>position</code>. When <code>USERARCH_OVERLAP</code> is on, the result match may span across <code>position</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">position</td><td>index position the search is to begin at </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The character index of the first match preceding <code>pos</code>, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005537">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a6be0c1c2f412c0ae13cb9c7c1796d7a4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t usearch_previous </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index of the previous point at which the string text matches the search pattern, starting at the current position. </p>
<p>The iterator is adjusted so that its current index (as returned by <code>usearch_getOffset</code>) is the match position if one was found. If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to the index <code>USEARCH_DONE</code> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the previous match before the current position, or <code>USEARCH_DONE</code> if there are no more matches. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#aad61fadd096cd28a454f68fa117a24cb" title="Returns the last index in the target text at which it matches the search pattern. ...">usearch_last</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ad5913a0eff26b126630d802195fa4622" title="Return the current index in the string text being searched. ">usearch_getOffset</a> </dd>
<dd>
<a class="el" href="usearch_8h.html#ab66c48ad34ba3832680f23da3e0f70aa" title="DONE is returned by previous() and next() after all valid matches have been returned, and by first() and last() if there are no matches at all. ">USEARCH_DONE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005539">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a52484e482e408ddc091cc43b0d1decd9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_reset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset the iteration. </p>
<p>Search will begin at the start of the text string if a forward iteration is initiated before a backwards iteration. Otherwise if a backwards iteration is initiated before a forwards iteration, the search will begin at the end of the text string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#ad59a7f4746faf28c98fee8473e0353d4" title="Returns the first index at which the string text matches the search pattern. ">usearch_first</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005540">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a429ec33f40f29f25d41ce8a1f7513465"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> usearch_search </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>startIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>matchStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>matchLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Simple forward search for the pattern, starting at a specified index, and using using a default set search options. </p>
<p>This is an experimental function, and is not an official part of the ICU API.</p>
<p>The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored.</p>
<p>The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and any Break Iterator are ignored.</p>
<p>Matches obey the following constraints: </p><pre class="fragment">Characters at the start or end positions of a match that are ignorable
for collation are not included as part of the match, unless they
are part of a combining sequence, as described below.

A match will not include a partial combining sequence.  Combining
character sequences  are considered to be  inseperable units,
and either match the pattern completely, or are considered to not match
at all.  Thus, for example, an A followed a combining accent mark will 
not be found when searching for a plain (unaccented) A.   (unless
the collation strength has been set to ignore all accents).

When beginning a search, the initial starting position, startIdx,
is assumed to be an acceptable match boundary with respect to
combining characters.  A combining sequence that spans across the
starting point will not supress a match beginning at startIdx.

Characters that expand to multiple collation elements
(German sharp-S becoming 'ss', or the composed forms of accented
characters, for example) also must match completely.
Searching for a single 's' in a string containing only a sharp-s will 
find no match.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>the UStringSearch struct, which references both the text to be searched and the pattern being sought. </td></tr>
    <tr><td class="paramname">startIdx</td><td>The index into the text to begin the search. </td></tr>
    <tr><td class="paramname">matchStart</td><td>An out parameter, the starting index of the matched text. This parameter may be NULL. A value of -1 will be returned if no match was found. </td></tr>
    <tr><td class="paramname">matchLimit</td><td>Out parameter, the index of the first position following the matched text. The matchLimit will be at a suitable position for beginning a subsequent search in the input text. This parameter may be NULL. A value of -1 will be returned if no match was found.</td></tr>
    <tr><td class="paramname">status</td><td>Report any errors. Note that no match found is not an error. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if a match was found, FALSE otherwise.</dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000487">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="aafad5d71a67ca39ba1886fbae3659a5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> usearch_searchBackwards </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>startIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>matchStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>matchLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Simple backwards search for the pattern, starting at a specified index, and using using a default set search options. </p>
<p>This is an experimental function, and is not an official part of the ICU API.</p>
<p>The collator options, such as UCOL_STRENGTH and UCOL_NORMALIZTION, are honored.</p>
<p>The UStringSearch options USEARCH_CANONICAL_MATCH, USEARCH_OVERLAP and any Break Iterator are ignored.</p>
<p>Matches obey the following constraints: </p><pre class="fragment">Characters at the start or end positions of a match that are ignorable
for collation are not included as part of the match, unless they
are part of a combining sequence, as described below.

A match will not include a partial combining sequence.  Combining
character sequences  are considered to be  inseperable units,
and either match the pattern completely, or are considered to not match
at all.  Thus, for example, an A followed a combining accent mark will 
not be found when searching for a plain (unaccented) A.   (unless
the collation strength has been set to ignore all accents).

When beginning a search, the initial starting position, startIdx,
is assumed to be an acceptable match boundary with respect to
combining characters.  A combining sequence that spans across the
starting point will not supress a match beginning at startIdx.

Characters that expand to multiple collation elements
(German sharp-S becoming 'ss', or the composed forms of accented
characters, for example) also must match completely.
Searching for a single 's' in a string containing only a sharp-s will 
find no match.
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>the UStringSearch struct, which references both the text to be searched and the pattern being sought. </td></tr>
    <tr><td class="paramname">startIdx</td><td>The index into the text to begin the search. </td></tr>
    <tr><td class="paramname">matchStart</td><td>An out parameter, the starting index of the matched text. This parameter may be NULL. A value of -1 will be returned if no match was found. </td></tr>
    <tr><td class="paramname">matchLimit</td><td>Out parameter, the index of the first position following the matched text. The matchLimit will be at a suitable position for beginning a subsequent search in the input text. This parameter may be NULL. A value of -1 will be returned if no match was found.</td></tr>
    <tr><td class="paramname">status</td><td>Report any errors. Note that no match found is not an error. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if a match was found, FALSE otherwise.</dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000488">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="ac983c4347f0d3d0179d67f0e9ba47bd0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setAttribute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#aa382f146f1968a9d1dc182100b23ac03">USearchAttribute</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#afbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a>&#160;</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> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the text searching attributes located in the enum USearchAttribute with values from the enum USearchAttributeValue. </p>
<p><code>USEARCH_DEFAULT</code> can be used for all attributes for resetting. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">attribute</td><td>text attribute to be set </td></tr>
    <tr><td class="paramname">value</td><td>text attribute value </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a22948a4f2340979d38e145e13efb7a86" title="Gets the text searching attributes. ">usearch_getAttribute</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005521">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a86d42a1e90bb714a38a314d5bb77cda5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setBreakIterator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubrk_8h.html#adb85bb46d5f93c87098e11deab50bef4">UBreakIterator</a> *&#160;</td>
          <td class="paramname"><em>breakiter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the BreakIterator that will be used to restrict the points at which matches are detected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">breakiter</td><td>A BreakIterator that will be used to restrict the points at which matches are detected. If a match is found, but the match's start or end index is not a boundary as determined by the <code>BreakIterator</code>, the match will be rejected and another will be searched for. If this parameter is <code>NULL</code>, no break detection is attempted. </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a1386c96d1215f380a0678bf368efbbba" title="Returns the BreakIterator that is used to restrict the points at which matches are detected...">usearch_getBreakIterator</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005526">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="ac54be8b9a44d22ec6ea5d53f3cc5d7c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setCollator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ucol_8h.html#a3c4eeb412a5fd72762e6245aa75ca081">UCollator</a> *&#160;</td>
          <td class="paramname"><em>collator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the collator used for the language rules. </p>
<p>User retains the ownership of this collator, thus the responsibility of deletion lies with the user. This method causes internal data such as Boyer-Moore shift tables to be recalculated, but the iterator's position is unchanged. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">collator</td><td>to be used </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005531">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a1291f11a16b4b1090eb7029e4c51c70a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setOffset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the current position in the text string which the next search will start from. </p>
<p>Clears previous states. This method takes the argument index and sets the position in the text string accordingly without checking if the index is pointing to a valid starting point to begin searching. Search positions that may render incorrect results are highlighted in the header comments </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">position</td><td>position to start next search from. If position is less than or greater than the text range for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned </td></tr>
    <tr><td class="paramname">status</td><td>error status if any. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005519">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="aa2d53cd40c636eb0da13b891e4a84dbb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setPattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>patternlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the pattern used for matching. </p>
<p>Internal data like the Boyer Moore table will be recalculated, but the iterator's position is unchanged. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">pattern</td><td>string </td></tr>
    <tr><td class="paramname">patternlength</td><td>pattern length, -1 for null-terminated string </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs. If text is NULL, or textlength is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned with no change done to strsrch. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005532">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a09c1c5d4ea8b69ce32993dff6426a386"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usearch_setText </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#ab244c09051ecef7e477be6f3e247796d">UStringSearch</a> *&#160;</td>
          <td class="paramname"><em>strsrch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>textlength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the string text to be searched. </p>
<p>Text iteration will hence begin at the start of the text string. This method is useful if you want to re-use an iterator to search for the same pattern within a different body of text. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strsrch</td><td>search iterator data struct </td></tr>
    <tr><td class="paramname">text</td><td>new string to look for match </td></tr>
    <tr><td class="paramname">textlength</td><td>length of the new string, -1 for null-termination </td></tr>
    <tr><td class="paramname">status</td><td>for errors if it occurs. If text is NULL, or textlength is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned with no change done to strsrch. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="usearch_8h.html#a4c0acb3936f46b566e39874e6f063f1b" title="Return the string text to be searched. ">usearch_getText</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005528">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>