Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 413

libicu-doc-3.6-5.16.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.6: uiter.h File 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.4.7 -->
<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><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><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="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>uiter.h File Reference</h1>C API: Unicode Character Iteration. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>&quot;</code><br>

<p>
<a href="uiter_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUCharIterator.html">UCharIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">C API for code unit iteration.  <a href="structUCharIterator.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#82e604ea348bfd00208578b71c6ff070">UITER_NO_STATE</a>&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>)0xffffffff)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant for <a class="el" href="structUCharIterator.html">UCharIterator</a> getState() indicating an error or an unknown state.  <a href="#82e604ea348bfd00208578b71c6ff070"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structUCharIterator.html">UCharIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#c32417b245876891aea7d862d44c63da">UCharIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">C typedef for struct <a class="el" href="structUCharIterator.html">UCharIterator</a>.  <a href="#c32417b245876891aea7d862d44c63da"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#1516abdf786c1b71c20f969ec6a82748">UCharIteratorGetIndex</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> origin)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#ceee2204e85310acc2170d76a8f60403">UCharIterator.getIndex()</a>.  <a href="#1516abdf786c1b71c20f969ec6a82748"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#0a5c63a070ea2f178503317cddd8476a">UCharIteratorMove</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> delta, <a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> origin)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#00da6719b6421848e0cec6f1698050a1">UCharIterator.move()</a>.  <a href="#0a5c63a070ea2f178503317cddd8476a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#c2b2abfaa464290206e3b1af5f5f736d">UCharIteratorHasNext</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#d383e5d70b8d22aa613ff41c73a0d298">UCharIterator.hasNext()</a>.  <a href="#c2b2abfaa464290206e3b1af5f5f736d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#04311d92e75de74d21d701f271bac990">UCharIteratorHasPrevious</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#3619cced371773eb4196009de6b5d845">UCharIterator.hasPrevious()</a>.  <a href="#04311d92e75de74d21d701f271bac990"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#d6228b683cee832368de52980b364d81">UCharIteratorCurrent</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#9901070bd8bb085db7ee8b1bd9df0ea3">UCharIterator.current()</a>.  <a href="#d6228b683cee832368de52980b364d81"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#afadded49fad18992105b2c26e4b425b">UCharIteratorNext</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#4a1ee37c94acb3e1115cb22a2d7f3e23">UCharIterator.next()</a>.  <a href="#afadded49fad18992105b2c26e4b425b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#c8ccc58c89a84e76682f207066d7a8ad">UCharIteratorPrevious</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#be38573816591020d1f713ce9ae8a3d2">UCharIterator.previous()</a>.  <a href="#c8ccc58c89a84e76682f207066d7a8ad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#66676833d08ac771279d76bbd1444c5b">UCharIteratorReserved</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> something)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#d0fe29456e81af0f589a9fc5fed10ce1">UCharIterator.reservedFn()</a>.  <a href="#66676833d08ac771279d76bbd1444c5b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#3c299a1fcd3cb9065e976d172022f8e2">UCharIteratorGetState</a> (const <a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#5485da8c057003f2368bfcbabf96f833">UCharIterator.getState()</a>.  <a href="#3c299a1fcd3cb9065e976d172022f8e2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#b95f0fd3b8a9b2a4db4f7cd0f6356b0a">UCharIteratorSetState</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> state, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for <a class="el" href="structUCharIterator.html#fa8da198f9ca336d9107292610bed422">UCharIterator.setState()</a>.  <a href="#b95f0fd3b8a9b2a4db4f7cd0f6356b0a"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> { <br>
&nbsp;&nbsp;<b>UITER_START</b>, 
<b>UITER_CURRENT</b>, 
<b>UITER_LIMIT</b>, 
<b>UITER_ZERO</b>, 
<br>
&nbsp;&nbsp;<b>UITER_LENGTH</b>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Origin constants for <a class="el" href="structUCharIterator.html#ceee2204e85310acc2170d76a8f60403">UCharIterator.getIndex()</a> and <a class="el" href="structUCharIterator.html#00da6719b6421848e0cec6f1698050a1">UCharIterator.move()</a>.  <a href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="uiter_8h.html#1af138ee919beeb88a50aa27b42124b765b9c5419eb8a67e2cd7702af6c5a252">UITER_UNKNOWN_INDEX</a> = -2
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constants for <a class="el" href="structUCharIterator.html">UCharIterator</a>.  <a href="uiter_8h.html#1af138ee919beeb88a50aa27b42124b7">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#d3e1d2530c796ed695be728cb1211e56">uiter_current32</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the code point at the current index.  <a href="#d3e1d2530c796ed695be728cb1211e56"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#50f9fa0b9ddc811cbb758b07080a239c">uiter_next32</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the next code point.  <a href="#50f9fa0b9ddc811cbb758b07080a239c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#b18566020fcf46bcd5b44eb537a38948">uiter_previous32</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the previous code point.  <a href="#b18566020fcf46bcd5b44eb537a38948"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uiter_8h.html#0a3c0244f9b6f0e809b0b4be95e12e4f">uiter_getState</a> (const <a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the "state" of the iterator in the form of a single 32-bit word.  <a href="#0a3c0244f9b6f0e809b0b4be95e12e4f"></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="uiter_8h.html#a084dfa5e671b1f73b3006429328664c">uiter_setState</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> state, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Restore the "state" of the iterator using a state word from a getState() call.  <a href="#a084dfa5e671b1f73b3006429328664c"></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="uiter_8h.html#7985707a4907c11b0321d662691a881e">uiter_setString</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, const UChar *s, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a string.  <a href="#7985707a4907c11b0321d662691a881e"></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="uiter_8h.html#599221e93fe0fc46efb056ea77986298">uiter_setUTF16BE</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, const char *s, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a UTF-16BE string (byte vector with a big-endian pair of bytes per UChar).  <a href="#599221e93fe0fc46efb056ea77986298"></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="uiter_8h.html#13a6448be8688d8dc03eedf12a0195af">uiter_setUTF8</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, const char *s, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a UTF-8 string.  <a href="#13a6448be8688d8dc03eedf12a0195af"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Unicode Character Iteration. 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>

<p>
Definition in file <a class="el" href="uiter_8h-source.html">uiter.h</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="82e604ea348bfd00208578b71c6ff070"></a><!-- doxytag: member="uiter.h::UITER_NO_STATE" ref="82e604ea348bfd00208578b71c6ff070" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UITER_NO_STATE&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>)0xffffffff)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constant for <a class="el" href="structUCharIterator.html">UCharIterator</a> getState() indicating an error or an unknown state. 
<p>
Returned by <a class="el" href="uiter_8h.html#0a3c0244f9b6f0e809b0b4be95e12e4f">uiter_getState()</a>/UCharIteratorGetState when an error occurs. Also, some <a class="el" href="structUCharIterator.html">UCharIterator</a> implementations may not be able to return a valid state for each position. This will be clearly documented for each such iterator (none of the public ones here).<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001009">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00084">84</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="c32417b245876891aea7d862d44c63da"></a><!-- doxytag: member="uiter.h::UCharIterator" ref="c32417b245876891aea7d862d44c63da" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structUCharIterator.html">UCharIterator</a> <a class="el" href="structUCharIterator.html">UCharIterator</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
C typedef for struct <a class="el" href="structUCharIterator.html">UCharIterator</a>. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001006">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00041">41</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="d6228b683cee832368de52980b364d81"></a><!-- doxytag: member="uiter.h::UCharIteratorCurrent" ref="d6228b683cee832368de52980b364d81" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV <a class="el" href="uiter_8h.html#d6228b683cee832368de52980b364d81">UCharIteratorCurrent</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#9901070bd8bb085db7ee8b1bd9df0ea3">UCharIterator.current()</a>. 
<p>
Return the code unit at the current position, or U_SENTINEL if there is none (index is at the limit).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current code unit</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001014">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00186">186</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="1516abdf786c1b71c20f969ec6a82748"></a><!-- doxytag: member="uiter.h::UCharIteratorGetIndex" ref="1516abdf786c1b71c20f969ec6a82748" args="(UCharIterator *iter, UCharIteratorOrigin origin)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV <a class="el" href="uiter_8h.html#1516abdf786c1b71c20f969ec6a82748">UCharIteratorGetIndex</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> origin)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#ceee2204e85310acc2170d76a8f60403">UCharIterator.getIndex()</a>. 
<p>
Gets the current position, or the start or limit of the iteration range.<p>
This function may perform slowly for UITER_CURRENT after setState() was called, or for UITER_LENGTH, because an iterator implementation may have to count UChars if the underlying storage is not UTF-16.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>origin</em>&nbsp;</td><td>get the 0, start, limit, length, or current index </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the requested index, or U_SENTINEL in an error condition</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> <p>
<a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001010">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00105">105</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="3c299a1fcd3cb9065e976d172022f8e2"></a><!-- doxytag: member="uiter.h::UCharIteratorGetState" ref="3c299a1fcd3cb9065e976d172022f8e2" args="(const UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> U_CALLCONV <a class="el" href="uiter_8h.html#3c299a1fcd3cb9065e976d172022f8e2">UCharIteratorGetState</a>(const <a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#5485da8c057003f2368bfcbabf96f833">UCharIterator.getState()</a>. 
<p>
Get the "state" of the iterator in the form of a single 32-bit word. It is recommended that the state value be calculated to be as small as is feasible. For strings with limited lengths, fewer than 32 bits may be sufficient.<p>
This is used together with setState()/UCharIteratorSetState to save and restore the iterator position more efficiently than with getIndex()/move().<p>
The iterator state is defined as a uint32_t value because it is designed for use in <a class="el" href="ucol_8h.html#f09e3335e6d70a4e7b45200c286f15bd">ucol_nextSortKeyPart()</a> which provides 32 bits to store the state of the character iterator.<p>
With some <a class="el" href="structUCharIterator.html">UCharIterator</a> implementations (e.g., UTF-8), getting and setting the UTF-16 index with existing functions (getIndex(UITER_CURRENT) followed by move(pos, UITER_ZERO)) is possible but relatively slow because the iterator has to "walk" from a known index to the requested one. This takes more time the farther it needs to go.<p>
An opaque state value allows an iterator implementation to provide an internal index (UTF-8: the source byte array index) for fast, constant-time restoration.<p>
After calling setState(), a getIndex(UITER_CURRENT) may be slow because the UTF-16 index may not be restored as well, but the iterator can deliver the correct text contents and move relative to the current position without performance degradation.<p>
Some <a class="el" href="structUCharIterator.html">UCharIterator</a> implementations may not be able to return a valid state for each position, in which case they return UITER_NO_STATE instead. This will be clearly documented for each such iterator (none of the public ones here).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the state word</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#b95f0fd3b8a9b2a4db4f7cd0f6356b0a">UCharIteratorSetState</a> <p>
<a class="el" href="uiter_8h.html#82e604ea348bfd00208578b71c6ff070">UITER_NO_STATE</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001018">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00279">279</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="c2b2abfaa464290206e3b1af5f5f736d"></a><!-- doxytag: member="uiter.h::UCharIteratorHasNext" ref="c2b2abfaa464290206e3b1af5f5f736d" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV <a class="el" href="uiter_8h.html#c2b2abfaa464290206e3b1af5f5f736d">UCharIteratorHasNext</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#d383e5d70b8d22aa613ff41c73a0d298">UCharIterator.hasNext()</a>. 
<p>
Check if current() and next() can still return another code unit.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>boolean value for whether current() and next() can still return another code unit</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001012">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00157">157</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="04311d92e75de74d21d701f271bac990"></a><!-- doxytag: member="uiter.h::UCharIteratorHasPrevious" ref="04311d92e75de74d21d701f271bac990" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> U_CALLCONV <a class="el" href="uiter_8h.html#04311d92e75de74d21d701f271bac990">UCharIteratorHasPrevious</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#3619cced371773eb4196009de6b5d845">UCharIterator.hasPrevious()</a>. 
<p>
Check if previous() can still return another code unit.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>boolean value for whether previous() can still return another code unit</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001013">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00171">171</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="0a5c63a070ea2f178503317cddd8476a"></a><!-- doxytag: member="uiter.h::UCharIteratorMove" ref="0a5c63a070ea2f178503317cddd8476a" args="(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV <a class="el" href="uiter_8h.html#0a5c63a070ea2f178503317cddd8476a">UCharIteratorMove</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> delta, <a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> origin)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#00da6719b6421848e0cec6f1698050a1">UCharIterator.move()</a>. 
<p>
Use iter-&gt;move(iter, index, UITER_ZERO) like CharacterIterator::setIndex(index).<p>
Moves the current position relative to the start or limit of the iteration range, or relative to the current position itself. The movement is expressed in numbers of code units forward or backward by specifying a positive or negative delta. Out of bounds movement will be pinned to the start or limit.<p>
This function may perform slowly for moving relative to UITER_LENGTH because an iterator implementation may have to count the rest of the UChars if the native storage is not UTF-16.<p>
When moving relative to the limit or length, or relative to the current position after setState() was called, move() may return UITER_UNKNOWN_INDEX (-2) to avoid an inefficient determination of the actual UTF-16 index. The actual index can be determined with getIndex(UITER_CURRENT) which will count the UChars if necessary. See UITER_UNKNOWN_INDEX for details.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>delta</em>&nbsp;</td><td>can be positive, zero, or negative </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>origin</em>&nbsp;</td><td>move relative to the 0, start, limit, length, or current index </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the new index, or U_SENTINEL on an error condition, or UITER_UNKNOWN_INDEX when the index is not known.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a> <p>
<a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#1af138ee919beeb88a50aa27b42124b765b9c5419eb8a67e2cd7702af6c5a252">UITER_UNKNOWN_INDEX</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001011">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00142">142</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="afadded49fad18992105b2c26e4b425b"></a><!-- doxytag: member="uiter.h::UCharIteratorNext" ref="afadded49fad18992105b2c26e4b425b" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV <a class="el" href="uiter_8h.html#afadded49fad18992105b2c26e4b425b">UCharIteratorNext</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#4a1ee37c94acb3e1115cb22a2d7f3e23">UCharIterator.next()</a>. 
<p>
Return the code unit at the current index and increment the index (post-increment, like s[i++]), or return U_SENTINEL if there is none (index is at the limit).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current code unit (and post-increment the current index)</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001015">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00202">202</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="c8ccc58c89a84e76682f207066d7a8ad"></a><!-- doxytag: member="uiter.h::UCharIteratorPrevious" ref="c8ccc58c89a84e76682f207066d7a8ad" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> U_CALLCONV <a class="el" href="uiter_8h.html#c8ccc58c89a84e76682f207066d7a8ad">UCharIteratorPrevious</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#be38573816591020d1f713ce9ae8a3d2">UCharIterator.previous()</a>. 
<p>
Decrement the index and return the code unit from there (pre-decrement, like s[--i]), or return U_SENTINEL if there is none (index is at the start).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the previous code unit (after pre-decrementing the current index)</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001016">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00218">218</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="66676833d08ac771279d76bbd1444c5b"></a><!-- doxytag: member="uiter.h::UCharIteratorReserved" ref="66676833d08ac771279d76bbd1444c5b" args="(UCharIterator *iter, int32_t something)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV <a class="el" href="uiter_8h.html#66676833d08ac771279d76bbd1444c5b">UCharIteratorReserved</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> something)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#d0fe29456e81af0f589a9fc5fed10ce1">UCharIterator.reservedFn()</a>. 
<p>
Reserved for future use.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>something</em>&nbsp;</td><td>some integer argument </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>some integer</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001017">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00232">232</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="b95f0fd3b8a9b2a4db4f7cd0f6356b0a"></a><!-- doxytag: member="uiter.h::UCharIteratorSetState" ref="b95f0fd3b8a9b2a4db4f7cd0f6356b0a" args="(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="uiter_8h.html#b95f0fd3b8a9b2a4db4f7cd0f6356b0a">UCharIteratorSetState</a>(<a class="el" href="structUCharIterator.html">UCharIterator</a> *iter, <a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> state, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *<a class="el" href="ucnv_8h.html#7fb88d17e64bfb1dd2320c317ce1a1c6">pErrorCode</a>)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for <a class="el" href="structUCharIterator.html#fa8da198f9ca336d9107292610bed422">UCharIterator.setState()</a>. 
<p>
Restore the "state" of the iterator using a state word from a getState() call. The iterator object need not be the same one as for which getState() was called, but it must be of the same type (set up using the same uiter_setXYZ function) and it must iterate over the same string (binary identical regardless of memory address). For more about the state word see UCharIteratorGetState.<p>
After calling setState(), a getIndex(UITER_CURRENT) may be slow because the UTF-16 index may not be restored as well, but the iterator can deliver the correct text contents and move relative to the current position without performance degradation.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>the state word from a getState() call on a same-type, same-string iterator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>Must be a valid pointer to an error code value, which must not indicate a failure before the function call.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#3c299a1fcd3cb9065e976d172022f8e2">UCharIteratorGetState</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001019">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00307">307</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="1af138ee919beeb88a50aa27b42124b7"></a><!-- doxytag: member="uiter.h::@5" ref="1af138ee919beeb88a50aa27b42124b7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constants for <a class="el" href="structUCharIterator.html">UCharIterator</a>. 
<p>
<dl compact><dt><b>Stable:</b></dt><dd>ICU 2.6 </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="1af138ee919beeb88a50aa27b42124b765b9c5419eb8a67e2cd7702af6c5a252"></a><!-- doxytag: member="UITER_UNKNOWN_INDEX" ref="1af138ee919beeb88a50aa27b42124b765b9c5419eb8a67e2cd7702af6c5a252" args="" -->UITER_UNKNOWN_INDEX</em>&nbsp;</td><td>
Constant value that may be returned by UCharIteratorMove indicating that the final UTF-16 index is not known, but that the move succeeded. 
<p>
This can occur when moving relative to limit or length, or when moving relative to the current index after a setState() when the current UTF-16 index is not known.<p>
It would be very inefficient to have to count from the beginning of the text just to get the current/limit/length index after moving relative to it. The actual index can be determined with getIndex(UITER_CURRENT) which will count the UChars if necessary.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001029">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00054">54</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<a class="anchor" name="ed8ac93b48fdb7f62f1ebe4078bbb5d4"></a><!-- doxytag: member="uiter.h::UCharIteratorOrigin" ref="ed8ac93b48fdb7f62f1ebe4078bbb5d4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="uiter_8h.html#ed8ac93b48fdb7f62f1ebe4078bbb5d4">UCharIteratorOrigin</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Origin constants for <a class="el" href="structUCharIterator.html#ceee2204e85310acc2170d76a8f60403">UCharIterator.getIndex()</a> and <a class="el" href="structUCharIterator.html#00da6719b6421848e0cec6f1698050a1">UCharIterator.move()</a>. 
<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="uiter_8h.html#0a5c63a070ea2f178503317cddd8476a">UCharIteratorMove</a> <p>
<a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001007">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

<p>
Definition at line <a class="el" href="uiter_8h-source.html#l00049">49</a> of file <a class="el" href="uiter_8h-source.html">uiter.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="d3e1d2530c796ed695be728cb1211e56"></a><!-- doxytag: member="uiter.h::uiter_current32" ref="d3e1d2530c796ed695be728cb1211e56" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> uiter_current32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the code point at the current index. 
<p>
Return the code point that includes the code unit at the current position, or U_SENTINEL if there is none (index is at the limit). If the current code unit is a lead or trail surrogate, then the following or preceding surrogate is used to form the code point value.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current code point</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="utf16_8h.html#15d0f767b0a5c8c92816e914cce8e490">U16_GET</a> <p>
<a class="el" href="classUnicodeString.html#c40c7f9cde3a017bbc70b9ba488d63d3">UnicodeString::char32At()</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001021">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div><p>
<a class="anchor" name="0a3c0244f9b6f0e809b0b4be95e12e4f"></a><!-- doxytag: member="uiter.h::uiter_getState" ref="0a3c0244f9b6f0e809b0b4be95e12e4f" args="(const UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a> uiter_getState           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the "state" of the iterator in the form of a single 32-bit word. 
<p>
This is a convenience function that calls iter-&gt;getState(iter) if iter-&gt;getState is not NULL; if it is NULL or any other error occurs, then UITER_NO_STATE is returned.<p>
Some <a class="el" href="structUCharIterator.html">UCharIterator</a> implementations may not be able to return a valid state for each position, in which case they return UITER_NO_STATE instead. This will be clearly documented for each such iterator (none of the public ones here).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the state word</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#3c299a1fcd3cb9065e976d172022f8e2">UCharIteratorGetState</a> <p>
<a class="el" href="uiter_8h.html#82e604ea348bfd00208578b71c6ff070">UITER_NO_STATE</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001024">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="50f9fa0b9ddc811cbb758b07080a239c"></a><!-- doxytag: member="uiter.h::uiter_next32" ref="50f9fa0b9ddc811cbb758b07080a239c" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> uiter_next32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the next code point. 
<p>
Return the code point at the current index and increment the index (post-increment, like s[i++]), or return U_SENTINEL if there is none (index is at the limit).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the current code point (and post-increment the current index)</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="utf16_8h.html#1a6e1c638ac5ba466d13fa83949b740b">U16_NEXT</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001022">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b18566020fcf46bcd5b44eb537a38948"></a><!-- doxytag: member="uiter.h::uiter_previous32" ref="b18566020fcf46bcd5b44eb537a38948" args="(UCharIterator *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a5c18ea10e60c576fe5ec420a7ef7b28">UChar32</a> uiter_previous32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Helper function for <a class="el" href="structUCharIterator.html">UCharIterator</a> to get the previous code point. 
<p>
Decrement the index and return the code point from there (pre-decrement, like s[--i]), or return U_SENTINEL if there is none (index is at the start).<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the previous code point (after pre-decrementing the current index)</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="utf16_8h.html#149931004c5140c0a8655f891c99d894">U16_PREV</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001023">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a084dfa5e671b1f73b3006429328664c"></a><!-- doxytag: member="uiter.h::uiter_setState" ref="a084dfa5e671b1f73b3006429328664c" args="(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uiter_setState           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#6dffdaa3be697bee6b7286a8120d3638">uint32_t</a>&nbsp;</td>
          <td class="paramname"> <em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</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>
Restore the "state" of the iterator using a state word from a getState() call. 
<p>
This is a convenience function that calls iter-&gt;setState(iter, state, pErrorCode) if iter-&gt;setState is not NULL; if it is NULL, then U_UNSUPPORTED_ERROR is set.<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>iter</em>&nbsp;</td><td>the <a class="el" href="structUCharIterator.html">UCharIterator</a> structure ("this pointer") </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>the state word from a getState() call on a same-type, same-string iterator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>Must be a valid pointer to an error code value, which must not indicate a failure before the function call.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#b95f0fd3b8a9b2a4db4f7cd0f6356b0a">UCharIteratorSetState</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001025">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="7985707a4907c11b0321d662691a881e"></a><!-- doxytag: member="uiter.h::uiter_setString" ref="7985707a4907c11b0321d662691a881e" args="(UCharIterator *iter, const UChar *s, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uiter_setString           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</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 up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a string. 
<p>
Sets the <a class="el" href="structUCharIterator.html">UCharIterator</a> function pointers for iteration over the string s with iteration boundaries start=index=0 and length=limit=string length. The "provider" may set the start, index, and limit values at any time within the range 0..length. The length field will be ignored.<p>
The string pointer s is set into <a class="el" href="structUCharIterator.html#9cfe382fcb4efe746dd9801eb6a62196">UCharIterator.context</a> without copying or reallocating the string contents.<p>
getState() simply returns the current index. move() will always return the final index.<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>iter</em>&nbsp;</td><td><a class="el" href="structUCharIterator.html">UCharIterator</a> structure to be set for iteration </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>String to iterate over </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>Length of s, or -1 if NUL-terminated</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001026">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div><p>
<a class="anchor" name="599221e93fe0fc46efb056ea77986298"></a><!-- doxytag: member="uiter.h::uiter_setUTF16BE" ref="599221e93fe0fc46efb056ea77986298" args="(UCharIterator *iter, const char *s, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uiter_setUTF16BE           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</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 up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a UTF-16BE string (byte vector with a big-endian pair of bytes per UChar). 
<p>
Everything works just like with a normal UChar iterator (uiter_setString), except that UChars are assembled from byte pairs, and that the length argument here indicates an even number of bytes.<p>
getState() simply returns the current index. move() will always return the final index.<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>iter</em>&nbsp;</td><td><a class="el" href="structUCharIterator.html">UCharIterator</a> structure to be set for iteration </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>UTF-16BE string to iterate over </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>Length of s as an even number of bytes, or -1 if NUL-terminated (NUL means pair of 0 bytes at even index from s)</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> <p>
<a class="el" href="uiter_8h.html#7985707a4907c11b0321d662691a881e">uiter_setString</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001027">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="13a6448be8688d8dc03eedf12a0195af"></a><!-- doxytag: member="uiter.h::uiter_setUTF8" ref="13a6448be8688d8dc03eedf12a0195af" args="(UCharIterator *iter, const char *s, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uiter_setUTF8           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&nbsp;</td>
          <td class="paramname"> <em>iter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</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 up a <a class="el" href="structUCharIterator.html">UCharIterator</a> to iterate over a UTF-8 string. 
<p>
Sets the <a class="el" href="structUCharIterator.html">UCharIterator</a> function pointers for iteration over the UTF-8 string s with UTF-8 iteration boundaries 0 and length. The implementation counts the UTF-16 index on the fly and lazily evaluates the UTF-16 length of the text.<p>
The start field is used as the UTF-8 offset, the limit field as the UTF-8 length. When the reservedField is not 0, then it contains a supplementary code point and the UTF-16 index is between the two corresponding surrogates. At that point, the UTF-8 index is behind that code point.<p>
The UTF-8 string pointer s is set into <a class="el" href="structUCharIterator.html#9cfe382fcb4efe746dd9801eb6a62196">UCharIterator.context</a> without copying or reallocating the string contents.<p>
getState() returns a state value consisting of<ul>
<li>the current UTF-8 source byte index (bits 31..1)</li><li>a flag (bit 0) that indicates whether the UChar position is in the middle of a surrogate pair (from a 4-byte UTF-8 sequence for the corresponding supplementary code point)</li></ul>
<p>
getState() cannot also encode the UTF-16 index in the state value. move(relative to limit or length), or move(relative to current) after setState(), may return UITER_UNKNOWN_INDEX.<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>iter</em>&nbsp;</td><td><a class="el" href="structUCharIterator.html">UCharIterator</a> structure to be set for iteration </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>UTF-8 string to iterate over </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>Length of s in bytes, or -1 if NUL-terminated</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structUCharIterator.html">UCharIterator</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001028">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:52 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>