Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 137

icu-doc-3.8.1-2mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.8: SearchIterator Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>SearchIterator Class Reference</h1><!-- doxytag: class="SearchIterator" --><!-- doxytag: inherits="UObject" --><code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> is an abstract base class that provides methods to search for a pattern within a text string.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="search_8h-source.html">search.h</a>&gt;</code>
<p>
<p>Inheritance diagram for SearchIterator:
<p><center><img src="classSearchIterator.png" usemap="#SearchIterator_map" border="0" alt=""></center>
<map name="SearchIterator_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,93,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,93,24">
<area href="classStringSearch.html" alt="StringSearch" shape="rect" coords="0,168,93,192">
</map>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#ce7cb7b0e085eaffc03f6229f1aeab3f">SearchIterator</a> (const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor that creates a <a class="el" href="classSearchIterator.html">SearchIterator</a> instance with the same behavior, and iterating over the same text.  <a href="#ce7cb7b0e085eaffc03f6229f1aeab3f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#c088b4c1be49860879d4a7a37e71681f">~SearchIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#c088b4c1be49860879d4a7a37e71681f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#051291e515560612b18fd5c58b2fc523">setOffset</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the index to point to the given position, and clears any state that's affected.  <a href="#051291e515560612b18fd5c58b2fc523"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> (void) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current index in the text being searched.  <a href="#405b15d976003735d48fe1c534a5045d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#d82645422603995508e3d70990de5fd8">setAttribute</a> (<a class="el" href="usearch_8h.html#a382f146f1968a9d1dc182100b23ac03">USearchAttribute</a> attribute, <a class="el" href="usearch_8h.html#fbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a> value, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the text searching attributes located in the enum USearchAttribute with values from the enum USearchAttributeValue.  <a href="#d82645422603995508e3d70990de5fd8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="usearch_8h.html#fbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#411b164f8767a9aa6ab32d1c4377711b">getAttribute</a> (<a class="el" href="usearch_8h.html#a382f146f1968a9d1dc182100b23ac03">USearchAttribute</a> attribute) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the text searching attributes.  <a href="#411b164f8767a9aa6ab32d1c4377711b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#08250c1400fda7b63d2bbba7074db3a5">getMatchedStart</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index to the match in the text string that was searched.  <a href="#08250c1400fda7b63d2bbba7074db3a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#149e2eb5d6b1c719e26256981826ca02">getMatchedLength</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the length of text in the string which matches the search pattern.  <a href="#149e2eb5d6b1c719e26256981826ca02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#0e2384c7b332f2de5742df5254136dfe">getMatchedText</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;result) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the text that was matched by the most recent call to <code>first</code>, <code>next</code>, <code>previous</code>, or <code>last</code>.  <a href="#0e2384c7b332f2de5742df5254136dfe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#5999b2f5d0759a054ef0d9fbfae8598b">setBreakIterator</a> (<a class="el" href="classBreakIterator.html">BreakIterator</a> *breakiter, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the <a class="el" href="classBreakIterator.html">BreakIterator</a> that will be used to restrict the points at which matches are detected.  <a href="#5999b2f5d0759a054ef0d9fbfae8598b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classBreakIterator.html">BreakIterator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#f9586c922b1360ad177ae2d1a649d480">getBreakIterator</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classBreakIterator.html">BreakIterator</a> that is used to restrict the points at which matches are detected.  <a href="#f9586c922b1360ad177ae2d1a649d480"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#14a7f30bf44acdebd78559ec47424d7f">setText</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the string text to be searched.  <a href="#14a7f30bf44acdebd78559ec47424d7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#104395a4fb609992e1e170c98080366c">setText</a> (<a class="el" href="classCharacterIterator.html">CharacterIterator</a> &amp;text, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the string text to be searched.  <a href="#104395a4fb609992e1e170c98080366c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#1b343bf29465ac7be05493cbf9000534">getText</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the string text to be searched.  <a href="#1b343bf29465ac7be05493cbf9000534"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#d7c164b834e139bf80f99f746f56cb84">operator==</a> (const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;that) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Equality operator.  <a href="#d7c164b834e139bf80f99f746f56cb84"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#1255d95d44cccc8495527ae19c0bf0da">operator!=</a> (const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;that) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Not-equal operator.  <a href="#1255d95d44cccc8495527ae19c0bf0da"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classSearchIterator.html">SearchIterator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#7dfe65a9875be67e88151a1987053c6e">safeClone</a> (void) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a copy of <a class="el" href="classSearchIterator.html">SearchIterator</a> with the same behavior, and iterating over the same text, as this one.  <a href="#7dfe65a9875be67e88151a1987053c6e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#d4b0624d1dd56a45f1b11b39f569e185">first</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the first index at which the string text matches the search pattern.  <a href="#d4b0624d1dd56a45f1b11b39f569e185"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#6b8596ad970537354cb4dd68d1103a9d">following</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the first index greater than <code>position</code> at which the string text matches the search pattern.  <a href="#6b8596ad970537354cb4dd68d1103a9d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#a367405e344b6cb425c47e221293257d">last</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the last index in the target text at which it matches the search pattern.  <a href="#a367405e344b6cb425c47e221293257d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#55f50cb3ef1ffb73746121aeb43b1ae9">preceding</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the first index less than <code>position</code> at which the string text matches the search pattern.  <a href="#55f50cb3ef1ffb73746121aeb43b1ae9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#bc2fe871477a82214534b84062dd5763">next</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index of the next point at which the text matches the search pattern, starting from the current position The iterator is adjusted so that its current index (as returned by <code>getOffset</code>) is the match position if one was found.  <a href="#bc2fe871477a82214534b84062dd5763"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#6adda71b217ffa8ea4a74fc72db3e0df">previous</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="#6adda71b217ffa8ea4a74fc72db3e0df"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#d72b74b2fbe16ca0a449919984e85db9">reset</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the iteration.  <a href="#d72b74b2fbe16ca0a449919984e85db9"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#528076f54b4118e76a1790ba04987e2c">SearchIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#528076f54b4118e76a1790ba04987e2c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#aec88fe42044008487190bf00a2e4661">SearchIterator</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="classBreakIterator.html">BreakIterator</a> *breakiter=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor for use by subclasses.  <a href="#aec88fe42044008487190bf00a2e4661"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#028a9602382aca4555f56df8c964bb04">SearchIterator</a> (<a class="el" href="classCharacterIterator.html">CharacterIterator</a> &amp;text, <a class="el" href="classBreakIterator.html">BreakIterator</a> *breakiter=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor for use by subclasses.  <a href="#028a9602382aca4555f56df8c964bb04"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#da060084cf2fb3ccf7c64cb71488d89e">operator=</a> (const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;that)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#da060084cf2fb3ccf7c64cb71488d89e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#18c8f6a8faec99e860e6ee6e41fa630a">handleNext</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract method which subclasses override to provide the mechanism for finding the next match in the target text.  <a href="#18c8f6a8faec99e860e6ee6e41fa630a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#fa84ddfd9914bfb6857e8450b5571361">handlePrev</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract method which subclasses override to provide the mechanism for finding the previous match in the target text.  <a href="#fa84ddfd9914bfb6857e8450b5571361"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#2d6d2c4af6c45121336b0fa3e06f2e14">setMatchLength</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> <a class="el" href="ucnv_8h.html#2b811fa5f6e9b580fa0122d38e9849b5">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the length of the currently matched string in the text string to be searched.  <a href="#2d6d2c4af6c45121336b0fa3e06f2e14"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#030774198e9befb2ae0c37d85841dd0c">setMatchStart</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> position)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the offset of the currently matched string in the text string to be searched.  <a href="#030774198e9befb2ae0c37d85841dd0c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#2ef0f691ef79cf6b3a673afb6f0ed2b8">setMatchNotFound</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">sets match not found  <a href="#2ef0f691ef79cf6b3a673afb6f0ed2b8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="search_8h.html#b9a54441959795454ae0406609767131">USearch</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#37a71b3da6253680b3e24a3e0c3687a5">m_search_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">C search data struct.  <a href="#37a71b3da6253680b3e24a3e0c3687a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classBreakIterator.html">BreakIterator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#2fa2bb916a411a0df41f4f99e8e74419">m_breakiterator_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Break iterator.  <a href="#2fa2bb916a411a0df41f4f99e8e74419"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSearchIterator.html#da31ca7238c22c2d69fd5192fe036d3d">m_text_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unicode string version of the search text.  <a href="#da31ca7238c22c2d69fd5192fe036d3d"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> is an abstract base class that provides methods to search for a pattern within a text string. 
<p>
Instances of <code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> maintain a current position and scans over the target text, returning the indices the pattern is matched and the length of each match. <p>
<code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> defines a protocol for text searching. Subclasses provide concrete implementations of various search algorithms. For example, <code><a class="el" href="classStringSearch.html">StringSearch</a></code> implements language-sensitive pattern matching based on the comparison rules defined in a <code><a class="el" href="classRuleBasedCollator.html">RuleBasedCollator</a></code> object. <p>
Other options for searching includes using a <a class="el" href="classBreakIterator.html">BreakIterator</a> to restrict the points at which matches are detected. <p>
<code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> provides an API that is similar to that of other text iteration classes such as <code><a class="el" href="classBreakIterator.html">BreakIterator</a></code>. Using this class, it is easy to scan through text looking for all occurances of a given pattern. The following example uses a <code><a class="el" href="classStringSearch.html">StringSearch</a></code> object to find all instances of "fox" in the target string. Any other subclass of <code><a class="el" href="classSearchIterator.html">SearchIterator</a></code> can be used in an identical manner. <pre><code>
 <a class="el" href="classUnicodeString.html">UnicodeString</a> target("The quick brown fox jumped over the lazy fox");
 <a class="el" href="classUnicodeString.html">UnicodeString</a> pattern("fox");</code></pre><p>
<pre><code> <a class="el" href="classSearchIterator.html">SearchIterator</a> *iter  = new StringSearch(pattern, target);
 UErrorCode      error = U_ZERO_ERROR;
 for (int pos = iter-&gt;first(error); pos != USEARCH_DONE; 
                               pos = iter-&gt;next(error)) {
     printf("Found match at %d pos, length is %d\n", pos, 
                                             iter.getMatchLength());
 }
 </code></pre><p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classStringSearch.html">StringSearch</a> <p>
<a class="el" href="classRuleBasedCollator.html">RuleBasedCollator</a> </dd></dl>

<p>

<p>
Definition at line <a class="el" href="search_8h-source.html#l00079">79</a> of file <a class="el" href="search_8h-source.html">search.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="ce7cb7b0e085eaffc03f6229f1aeab3f"></a><!-- doxytag: member="SearchIterator::SearchIterator" ref="ce7cb7b0e085eaffc03f6229f1aeab3f" args="(const SearchIterator &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SearchIterator::SearchIterator           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy constructor that creates a <a class="el" href="classSearchIterator.html">SearchIterator</a> instance with the same behavior, and iterating over the same text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the <a class="el" href="classSearchIterator.html">SearchIterator</a> instance to be copied. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002661">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c088b4c1be49860879d4a7a37e71681f"></a><!-- doxytag: member="SearchIterator::~SearchIterator" ref="c088b4c1be49860879d4a7a37e71681f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual SearchIterator::~SearchIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>
Cleans up the search iterator data struct. <dl compact><dt><b><a class="el" href="stable.html#_stable002662">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="528076f54b4118e76a1790ba04987e2c"></a><!-- doxytag: member="SearchIterator::SearchIterator" ref="528076f54b4118e76a1790ba04987e2c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SearchIterator::SearchIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Default constructor. 
<p>
Initializes data to the default values. <dl compact><dt><b><a class="el" href="stable.html#_stable002688">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="aec88fe42044008487190bf00a2e4661"></a><!-- doxytag: member="SearchIterator::SearchIterator" ref="aec88fe42044008487190bf00a2e4661" args="(const UnicodeString &amp;text, BreakIterator *breakiter=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SearchIterator::SearchIterator           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classBreakIterator.html">BreakIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>breakiter</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor for use by subclasses. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The target text to be searched. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>breakiter</em>&nbsp;</td><td>A <a class="el" href="classBreakIterator.html">BreakIterator</a> that is used to restrict the points at which matches are detected. If <code>handleNext</code> or <code>handlePrev</code> finds a match, but the match's start or end index is not a boundary as determined by the <code><a class="el" href="classBreakIterator.html">BreakIterator</a></code>, the match is rejected and <code>handleNext</code> or <code>handlePrev</code> is called again. If this parameter is <code>NULL</code>, no break detection is attempted. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#18c8f6a8faec99e860e6ee6e41fa630a">handleNext</a> <p>
<a class="el" href="classSearchIterator.html#fa84ddfd9914bfb6857e8450b5571361">handlePrev</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002689">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="028a9602382aca4555f56df8c964bb04"></a><!-- doxytag: member="SearchIterator::SearchIterator" ref="028a9602382aca4555f56df8c964bb04" args="(CharacterIterator &amp;text, BreakIterator *breakiter=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SearchIterator::SearchIterator           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCharacterIterator.html">CharacterIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classBreakIterator.html">BreakIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>breakiter</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor for use by subclasses. 
<p>
Note: No parsing of the text within the <code><a class="el" href="classCharacterIterator.html">CharacterIterator</a></code> will be done during searching for this version. The block of text in <code><a class="el" href="classCharacterIterator.html">CharacterIterator</a></code> will be used as it is. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The target text to be searched. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>breakiter</em>&nbsp;</td><td>A <a class="el" href="classBreakIterator.html">BreakIterator</a> that is used to restrict the points at which matches are detected. If <code>handleNext</code> or <code>handlePrev</code> finds a match, but the match's start or end index is not a boundary as determined by the <code><a class="el" href="classBreakIterator.html">BreakIterator</a></code>, the match is rejected and <code>handleNext</code> or <code>handlePrev</code> is called again. If this parameter is <code>NULL</code>, no break detection is attempted. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#18c8f6a8faec99e860e6ee6e41fa630a">handleNext</a> <p>
<a class="el" href="classSearchIterator.html#fa84ddfd9914bfb6857e8450b5571361">handlePrev</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002690">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="051291e515560612b18fd5c58b2fc523"></a><!-- doxytag: member="SearchIterator::setOffset" ref="051291e515560612b18fd5c58b2fc523" args="(int32_t position, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::setOffset           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the index to point to the given position, and clears any state that's affected. 
<p>
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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>within the text to be set. 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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002663">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implemented in <a class="el" href="classStringSearch.html#6cdb73b15960f85ef3b046a551a61ecf">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="405b15d976003735d48fe1c534a5045d"></a><!-- doxytag: member="SearchIterator::getOffset" ref="405b15d976003735d48fe1c534a5045d" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::getOffset           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current index in the text being searched. 
<p>
If the iteration has gone past the end of the text (or past the beginning for a backwards search), USEARCH_DONE is returned. <dl class="return" compact><dt><b>Returns:</b></dt><dd>current index in the text being searched. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002664">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implemented in <a class="el" href="classStringSearch.html#36072e965203eb7272bc050a0c5e6e6b">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="d82645422603995508e3d70990de5fd8"></a><!-- doxytag: member="SearchIterator::setAttribute" ref="d82645422603995508e3d70990de5fd8" args="(USearchAttribute attribute, USearchAttributeValue value, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SearchIterator::setAttribute           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#a382f146f1968a9d1dc182100b23ac03">USearchAttribute</a>&nbsp;</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#fbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a>&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
USEARCH_DEFAULT can be used for all attributes for resetting. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>attribute</em>&nbsp;</td><td>text attribute (enum USearchAttribute) to be set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>text attribute value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002665">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="411b164f8767a9aa6ab32d1c4377711b"></a><!-- doxytag: member="SearchIterator::getAttribute" ref="411b164f8767a9aa6ab32d1c4377711b" args="(USearchAttribute attribute) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="usearch_8h.html#fbe777746540a229c0a2ff3323e292d1">USearchAttributeValue</a> SearchIterator::getAttribute           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="usearch_8h.html#a382f146f1968a9d1dc182100b23ac03">USearchAttribute</a>&nbsp;</td>
          <td class="paramname"> <em>attribute</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the text searching attributes. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>attribute</em>&nbsp;</td><td>text attribute (enum USearchAttribute) to be retrieve </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>text attribute value </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002666">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="08250c1400fda7b63d2bbba7074db3a5"></a><!-- doxytag: member="SearchIterator::getMatchedStart" ref="08250c1400fda7b63d2bbba7074db3a5" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::getMatchedStart           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index to the match in the text string that was searched. 
<p>
This call returns a valid result only after a successful call to <code>first</code>, <code>next</code>, <code>previous</code>, or <code>last</code>. Just after construction, or after a searching method returns <code>USEARCH_DONE</code>, this method will return <code>USEARCH_DONE</code>. <p>
Use getMatchedLength to get the matched string length. <dl class="return" compact><dt><b>Returns:</b></dt><dd>index of a substring within the text string that is being searched. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#d4b0624d1dd56a45f1b11b39f569e185">first</a> <p>
<a class="el" href="classSearchIterator.html#bc2fe871477a82214534b84062dd5763">next</a> <p>
<a class="el" href="classSearchIterator.html#6adda71b217ffa8ea4a74fc72db3e0df">previous</a> <p>
<a class="el" href="classSearchIterator.html#a367405e344b6cb425c47e221293257d">last</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002667">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="149e2eb5d6b1c719e26256981826ca02"></a><!-- doxytag: member="SearchIterator::getMatchedLength" ref="149e2eb5d6b1c719e26256981826ca02" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::getMatchedLength           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the length of text in the string which matches the search pattern. 
<p>
This call returns a valid result only after a successful call to <code>first</code>, <code>next</code>, <code>previous</code>, or <code>last</code>. Just after construction, or after a searching method returns <code>USEARCH_DONE</code>, this method will return 0. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The length of the match in the target text, or 0 if there is no match currently. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#d4b0624d1dd56a45f1b11b39f569e185">first</a> <p>
<a class="el" href="classSearchIterator.html#bc2fe871477a82214534b84062dd5763">next</a> <p>
<a class="el" href="classSearchIterator.html#6adda71b217ffa8ea4a74fc72db3e0df">previous</a> <p>
<a class="el" href="classSearchIterator.html#a367405e344b6cb425c47e221293257d">last</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002668">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0e2384c7b332f2de5742df5254136dfe"></a><!-- doxytag: member="SearchIterator::getMatchedText" ref="0e2384c7b332f2de5742df5254136dfe" args="(UnicodeString &amp;result) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SearchIterator::getMatchedText           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the text that was matched by the most recent call to <code>first</code>, <code>next</code>, <code>previous</code>, or <code>last</code>. 
<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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>stores the matched string or an empty string if a match is not found. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#d4b0624d1dd56a45f1b11b39f569e185">first</a> <p>
<a class="el" href="classSearchIterator.html#bc2fe871477a82214534b84062dd5763">next</a> <p>
<a class="el" href="classSearchIterator.html#6adda71b217ffa8ea4a74fc72db3e0df">previous</a> <p>
<a class="el" href="classSearchIterator.html#a367405e344b6cb425c47e221293257d">last</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002669">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="5999b2f5d0759a054ef0d9fbfae8598b"></a><!-- doxytag: member="SearchIterator::setBreakIterator" ref="5999b2f5d0759a054ef0d9fbfae8598b" args="(BreakIterator *breakiter, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SearchIterator::setBreakIterator           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classBreakIterator.html">BreakIterator</a> *&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the <a class="el" href="classBreakIterator.html">BreakIterator</a> that will be used to restrict the points at which matches are detected. 
<p>
The user is responsible for deleting the breakiterator. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>breakiter</em>&nbsp;</td><td>A <a class="el" href="classBreakIterator.html">BreakIterator</a> 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><a class="el" href="classBreakIterator.html">BreakIterator</a></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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classBreakIterator.html">BreakIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002670">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f9586c922b1360ad177ae2d1a649d480"></a><!-- doxytag: member="SearchIterator::getBreakIterator" ref="f9586c922b1360ad177ae2d1a649d480" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classBreakIterator.html">BreakIterator</a>* SearchIterator::getBreakIterator           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the <a class="el" href="classBreakIterator.html">BreakIterator</a> that is used to restrict the points at which matches are detected. 
<p>
This will be the same object that was passed to the constructor or to <code>setBreakIterator</code>. Note that <code>NULL</code> is a legal value; it means that break detection should not be attempted. <dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classBreakIterator.html">BreakIterator</a> used to restrict matchings. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#5999b2f5d0759a054ef0d9fbfae8598b">setBreakIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002671">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="14a7f30bf44acdebd78559ec47424d7f"></a><!-- doxytag: member="SearchIterator::setText" ref="14a7f30bf44acdebd78559ec47424d7f" args="(const UnicodeString &amp;text, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::setText           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the string text to be searched. 
<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. The user is responsible for deleting the text. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>string to be searched. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors. If the text length is 0, an U_ILLEGAL_ARGUMENT_ERROR is returned. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002672">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Reimplemented in <a class="el" href="classStringSearch.html#703c9716ef58efb5911229eaa2ed7e2a">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="104395a4fb609992e1e170c98080366c"></a><!-- doxytag: member="SearchIterator::setText" ref="104395a4fb609992e1e170c98080366c" args="(CharacterIterator &amp;text, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::setText           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classCharacterIterator.html">CharacterIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the string text to be searched. 
<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>
Note: No parsing of the text within the <code><a class="el" href="classCharacterIterator.html">CharacterIterator</a></code> will be done during searching for this version. The block of text in <code><a class="el" href="classCharacterIterator.html">CharacterIterator</a></code> will be used as it is. The user is responsible for deleting the text. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>string iterator to be searched. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if any. If the text length is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002673">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Reimplemented in <a class="el" href="classStringSearch.html#755fec7f70c3f7f9e2cb06985839ac43">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="1b343bf29465ac7be05493cbf9000534"></a><!-- doxytag: member="SearchIterator::getText" ref="1b343bf29465ac7be05493cbf9000534" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; SearchIterator::getText           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the string text to be searched. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>text string to be searched. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002674">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d7c164b834e139bf80f99f746f56cb84"></a><!-- doxytag: member="SearchIterator::operator==" ref="d7c164b834e139bf80f99f746f56cb84" args="(const SearchIterator &amp;that) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> SearchIterator::operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>that</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Equality operator. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>that</em>&nbsp;</td><td><a class="el" href="classSearchIterator.html">SearchIterator</a> instance to be compared. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if both BreakIterators are of the same class, have the same behavior, terates over the same text and have the same attributes. FALSE otherwise. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002675">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Reimplemented in <a class="el" href="classStringSearch.html#fad53ffeee52a8420d347b41504a127a">StringSearch</a>.
<p>
Referenced by <a class="el" href="search_8h-source.html#l00560">operator!=()</a>.
</div>
</div><p>
<a class="anchor" name="1255d95d44cccc8495527ae19c0bf0da"></a><!-- doxytag: member="SearchIterator::operator!=" ref="1255d95d44cccc8495527ae19c0bf0da" args="(const SearchIterator &amp;that) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> SearchIterator::operator!=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>that</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Not-equal operator. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>that</em>&nbsp;</td><td><a class="el" href="classSearchIterator.html">SearchIterator</a> instance to be compared. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>FALSE if operator== returns TRUE, and vice versa. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002676">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="search_8h-source.html#l00560">560</a> of file <a class="el" href="search_8h-source.html">search.h</a>.
<p>
References <a class="el" href="classSearchIterator.html#d7c164b834e139bf80f99f746f56cb84">operator==()</a>.
</div>
</div><p>
<a class="anchor" name="7dfe65a9875be67e88151a1987053c6e"></a><!-- doxytag: member="SearchIterator::safeClone" ref="7dfe65a9875be67e88151a1987053c6e" args="(void) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classSearchIterator.html">SearchIterator</a>* SearchIterator::safeClone           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a copy of <a class="el" href="classSearchIterator.html">SearchIterator</a> with the same behavior, and iterating over the same text, as this one. 
<p>
Note that all data will be replicated, except for the text string to be searched. <dl class="return" compact><dt><b>Returns:</b></dt><dd>cloned object </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002677">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implemented in <a class="el" href="classStringSearch.html#4b33f73a68dceee80574f86f421798f4">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="d4b0624d1dd56a45f1b11b39f569e185"></a><!-- doxytag: member="SearchIterator::first" ref="d4b0624d1dd56a45f1b11b39f569e185" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::first           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the first index at which the string text matches the search pattern. 
<p>
The iterator is adjusted so that its current index (as returned by <code>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 USEARCH_DONE <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The character index of the first match, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002678">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6b8596ad970537354cb4dd68d1103a9d"></a><!-- doxytag: member="SearchIterator::following" ref="6b8596ad970537354cb4dd68d1103a9d" args="(int32_t position, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::following           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the first index greater than <code>position</code> at which the string text matches the search pattern. 
<p>
The iterator is adjusted so that its current index (as returned by <code>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 USEARCH_DONE <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>where search if to start 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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The character index of the first match following <code>position</code>, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002679">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a367405e344b6cb425c47e221293257d"></a><!-- doxytag: member="SearchIterator::last" ref="a367405e344b6cb425c47e221293257d" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::last           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the last index in the target text at which it matches the search pattern. 
<p>
The iterator is adjusted so that its current index (as returned by <code>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 USEARCH_DONE. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The index of the first match, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002680">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="55f50cb3ef1ffb73746121aeb43b1ae9"></a><!-- doxytag: member="SearchIterator::preceding" ref="55f50cb3ef1ffb73746121aeb43b1ae9" args="(int32_t position, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::preceding           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
The iterator is adjusted so that its current index (as returned by <code>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 USEARCH_DONE <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>where search is to start 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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The character index of the first match preceding <code>position</code>, or <code>USEARCH_DONE</code> if there are no matches. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002681">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="bc2fe871477a82214534b84062dd5763"></a><!-- doxytag: member="SearchIterator::next" ref="bc2fe871477a82214534b84062dd5763" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::next           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the index of the next point at which the text matches the search pattern, starting from the current position The iterator is adjusted so that its current index (as returned by <code>getOffset</code>) is the match position if one was found. 
<p>
If a match is not found, <code>USEARCH_DONE</code> will be returned and the iterator will be adjusted to a position after the end of the text string. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></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="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002682">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="6adda71b217ffa8ea4a74fc72db3e0df"></a><!-- doxytag: member="SearchIterator::previous" ref="6adda71b217ffa8ea4a74fc72db3e0df" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::previous           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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>
The iterator is adjusted so that its current index (as returned by <code>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 USEARCH_DONE <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for errors if it occurs </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></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="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#405b15d976003735d48fe1c534a5045d">getOffset</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002683">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d72b74b2fbe16ca0a449919984e85db9"></a><!-- doxytag: member="SearchIterator::reset" ref="d72b74b2fbe16ca0a449919984e85db9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::reset           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets the iteration. 
<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. <dl compact><dt><b><a class="el" href="stable.html#_stable002684">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Reimplemented in <a class="el" href="classStringSearch.html#298259adcc5316a74ac9ce9b22e97c03">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="da060084cf2fb3ccf7c64cb71488d89e"></a><!-- doxytag: member="SearchIterator::operator=" ref="da060084cf2fb3ccf7c64cb71488d89e" args="(const SearchIterator &amp;that)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSearchIterator.html">SearchIterator</a>&amp; SearchIterator::operator=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSearchIterator.html">SearchIterator</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>that</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Assignment operator. 
<p>
Sets this iterator to have the same behavior, and iterate over the same text, as the one passed in. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>that</em>&nbsp;</td><td>instance to be copied. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002691">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="18c8f6a8faec99e860e6ee6e41fa630a"></a><!-- doxytag: member="SearchIterator::handleNext" ref="18c8f6a8faec99e860e6ee6e41fa630a" args="(int32_t position, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::handleNext           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Abstract method which subclasses override to provide the mechanism for finding the next match in the target text. 
<p>
This allows different subclasses to provide different search algorithms. <p>
If a match is found, the implementation should return the index at which the match starts and should call <code>setMatchLength</code> with the number of characters in the target text that make up the match. If no match is found, the method should return USEARCH_DONE. <p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>The index in the target text at which the search should start. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for error codes if it occurs. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>index at which the match starts, else if match is not found USEARCH_DONE is returned </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#2d6d2c4af6c45121336b0fa3e06f2e14">setMatchLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002692">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implemented in <a class="el" href="classStringSearch.html#f72f5e342a08ab606435ae49dd41d23b">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="fa84ddfd9914bfb6857e8450b5571361"></a><!-- doxytag: member="SearchIterator::handlePrev" ref="fa84ddfd9914bfb6857e8450b5571361" args="(int32_t position, UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> SearchIterator::handlePrev           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Abstract method which subclasses override to provide the mechanism for finding the previous match in the target text. 
<p>
This allows different subclasses to provide different search algorithms. <p>
If a match is found, the implementation should return the index at which the match starts and should call <code>setMatchLength</code> with the number of characters in the target text that make up the match. If no match is found, the method should return USEARCH_DONE. <p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>The index in the target text at which the search should start. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>for error codes if it occurs. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>index at which the match starts, else if match is not found USEARCH_DONE is returned </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#2d6d2c4af6c45121336b0fa3e06f2e14">setMatchLength</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002693">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implemented in <a class="el" href="classStringSearch.html#aeb4d82bf1a5917a2fd5819d179d050a">StringSearch</a>.
</div>
</div><p>
<a class="anchor" name="2d6d2c4af6c45121336b0fa3e06f2e14"></a><!-- doxytag: member="SearchIterator::setMatchLength" ref="2d6d2c4af6c45121336b0fa3e06f2e14" args="(int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::setMatchLength           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the length of the currently matched string in the text string to be searched. 
<p>
Subclasses' <code>handleNext</code> and <code>handlePrev</code> methods should call this when they find a match in the target text. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>length of the matched text. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#18c8f6a8faec99e860e6ee6e41fa630a">handleNext</a> <p>
<a class="el" href="classSearchIterator.html#fa84ddfd9914bfb6857e8450b5571361">handlePrev</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002694">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="030774198e9befb2ae0c37d85841dd0c"></a><!-- doxytag: member="SearchIterator::setMatchStart" ref="030774198e9befb2ae0c37d85841dd0c" args="(int32_t position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SearchIterator::setMatchStart           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>position</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the offset of the currently matched string in the text string to be searched. 
<p>
Subclasses' <code>handleNext</code> and <code>handlePrev</code> methods should call this when they find a match in the target text. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>start offset of the matched text. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classSearchIterator.html#18c8f6a8faec99e860e6ee6e41fa630a">handleNext</a> <p>
<a class="el" href="classSearchIterator.html#fa84ddfd9914bfb6857e8450b5571361">handlePrev</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002695">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="2ef0f691ef79cf6b3a673afb6f0ed2b8"></a><!-- doxytag: member="SearchIterator::setMatchNotFound" ref="2ef0f691ef79cf6b3a673afb6f0ed2b8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SearchIterator::setMatchNotFound           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
sets match not found 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002696">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="37a71b3da6253680b3e24a3e0c3687a5"></a><!-- doxytag: member="SearchIterator::m_search_" ref="37a71b3da6253680b3e24a3e0c3687a5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="search_8h.html#b9a54441959795454ae0406609767131">USearch</a>* <a class="el" href="classSearchIterator.html#37a71b3da6253680b3e24a3e0c3687a5">SearchIterator::m_search_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
C search data struct. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002685">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="search_8h-source.html#l00409">409</a> of file <a class="el" href="search_8h-source.html">search.h</a>.
</div>
</div><p>
<a class="anchor" name="2fa2bb916a411a0df41f4f99e8e74419"></a><!-- doxytag: member="SearchIterator::m_breakiterator_" ref="2fa2bb916a411a0df41f4f99e8e74419" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classBreakIterator.html">BreakIterator</a>* <a class="el" href="classSearchIterator.html#2fa2bb916a411a0df41f4f99e8e74419">SearchIterator::m_breakiterator_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Break iterator. 
<p>
Currently the C++ breakiterator does not have getRules etc to reproduce another in C. Hence we keep the original around and do the verification at the end of the match. The user is responsible for deleting this break iterator. <dl compact><dt><b><a class="el" href="stable.html#_stable002686">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="search_8h-source.html#l00419">419</a> of file <a class="el" href="search_8h-source.html">search.h</a>.
</div>
</div><p>
<a class="anchor" name="da31ca7238c22c2d69fd5192fe036d3d"></a><!-- doxytag: member="SearchIterator::m_text_" ref="da31ca7238c22c2d69fd5192fe036d3d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> <a class="el" href="classSearchIterator.html#da31ca7238c22c2d69fd5192fe036d3d">SearchIterator::m_text_</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unicode string version of the search text. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002687">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="search_8h-source.html#l00425">425</a> of file <a class="el" href="search_8h-source.html">search.h</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="search_8h-source.html">search.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:46 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>