Sophie

Sophie

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

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: utext.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.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><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>utext.h File Reference</h1>C API: Abstract Unicode Text API. <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="utext_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="structUTextFuncs.html">UTextFuncs</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">(public) Function dispatch table for <a class="el" href="structUText.html">UText</a>.  <a href="structUTextFuncs.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUText.html">UText</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structUText.html">UText</a> struct.  <a href="structUText.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="utext_8h.html#a4b973aeeb5f10f8aec454545f85b6a2">UTEXT_NEXT32</a>(ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">inline version of <a class="el" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32()</a>, for performance-critical situations.  <a href="#a4b973aeeb5f10f8aec454545f85b6a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#8aa3d9bae7b252622fe8e70e87758205">UTEXT_PREVIOUS32</a>(ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">inline version of <a class="el" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32()</a>, for performance-critical situations.  <a href="#8aa3d9bae7b252622fe8e70e87758205"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#23a003b461019bea876827b8b24cb364">UTEXT_GETNATIVEINDEX</a>(ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">inline version of <a class="el" href="utext_8h.html#cd28c25814787d3d1620e3edb8f917fd">utext_getNativeIndex()</a>, for performance-critical situations.  <a href="#23a003b461019bea876827b8b24cb364"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#74aa6ff1add5886508657997ca8d4747">UTEXT_SETNATIVEINDEX</a>(ut, ix)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">inline version of <a class="el" href="utext_8h.html#530b4bb7f0e577008e4930f2b39ecd8a">utext_setNativeIndex()</a>, for performance-critical situations.  <a href="#74aa6ff1add5886508657997ca8d4747"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#3dc916f710c0d3f17fe2a220384bcc8c">UTEXT_INITIALIZER</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initializer to be used with local (stack) instances of a <a class="el" href="structUText.html">UText</a> struct.  <a href="#3dc916f710c0d3f17fe2a220384bcc8c"></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="structUText.html">UText</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#8da22111033cc0c063d89cae348ec1e4">UText</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">C typedef for struct <a class="el" href="structUText.html">UText</a>.  <a href="#8da22111033cc0c063d89cae348ec1e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structUText.html">UText</a> *U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#3ca63bcf657509e4604d70434d6a83d4">UTextClone</a> (<a class="el" href="structUText.html">UText</a> *dest, const <a class="el" href="structUText.html">UText</a> *src, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> deep, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.clone().  <a href="#3ca63bcf657509e4604d70434d6a83d4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#ea56c4f0245b449fb5a3346c6fe3e022">UTextNativeLength</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.nativeLength().  <a href="#ea56c4f0245b449fb5a3346c6fe3e022"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#1f5dc096a853eaa7e03790b0ed14b8de">UTextAccess</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> forward)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.access().  <a href="#1f5dc096a853eaa7e03790b0ed14b8de"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#e1f71e9cae273d006c72f2ab3f6143c9">UTextExtract</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, UChar *dest, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> destCapacity, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.extract().  <a href="#e1f71e9cae273d006c72f2ab3f6143c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#4c911f2b913e270fbaf55a58aad909b4">UTextReplace</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, const UChar *replacementText, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> replacmentLength, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.replace().  <a href="#4c911f2b913e270fbaf55a58aad909b4"></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="utext_8h.html#b8abccd00ffedf836bd6cbf6ce160583">UTextCopy</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeDest, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> move, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.copy().  <a href="#b8abccd00ffedf836bd6cbf6ce160583"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#6ae2a19d39d565c5610eb3a2ccf0518b">UTextMapOffsetToNative</a> (const <a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.mapOffsetToNative().  <a href="#6ae2a19d39d565c5610eb3a2ccf0518b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#ce2f4d9b593cbedc97413bbdb6210c10">UTextMapNativeIndexToUTF16</a> (const <a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.mapIndexToUTF16().  <a href="#ce2f4d9b593cbedc97413bbdb6210c10"></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="utext_8h.html#c52b52c9fb86271888ea96e58910b2f6">UTextClose</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function type declaration for UText.utextClose().  <a href="#c52b52c9fb86271888ea96e58910b2f6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="caf57d3fd11db28583a36df05ec02295"></a><!-- doxytag: member="utext.h::UTextFuncs" ref="caf57d3fd11db28583a36df05ec02295" args="" -->
typedef <a class="el" href="structUTextFuncs.html">UTextFuncs</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#caf57d3fd11db28583a36df05ec02295">UTextFuncs</a></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">{ <br>
&nbsp;&nbsp;<a class="el" href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035d752c07f9df260b5b0e234e15eab97f9f">UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE</a> =  1, 
<a class="el" href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035d52bb5c9cacd1f46eb87a856c71c073be">UTEXT_PROVIDER_STABLE_CHUNKS</a> =  2, 
<a class="el" href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035dc67ce6ecf6bf959645e282f7194fbe3b">UTEXT_PROVIDER_WRITABLE</a> =  3, 
<a class="el" href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035d40c5cd24aea472f3752b4833b9ce63ca">UTEXT_PROVIDER_HAS_META_DATA</a> =  4, 
<br>
&nbsp;&nbsp;<a class="el" href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035d75695072a896ec104b5d77598a7429f7">UTEXT_PROVIDER_OWNS_TEXT</a> =  5
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structUText.html">UText</a> provider properties (bit field indexes).  <a href="utext_8h.html#bc5c98fcc1211af2b80116dd6e0a035d">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <b>UTEXT_MAGIC</b> =  0x345ad82c
 }</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="structUText.html">UText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#303eb28b0f98498dfcb063e05ab2695c">utext_close</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close function for <a class="el" href="structUText.html">UText</a> instances.  <a href="#303eb28b0f98498dfcb063e05ab2695c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structUText.html">UText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#32e9e14644d140c3501a7a09e7ad5864">utext_openUTF8</a> (<a class="el" href="structUText.html">UText</a> *ut, const char *s, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> <a class="el" href="ucnv_8h.html#2b811fa5f6e9b580fa0122d38e9849b5">length</a>, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a read-only <a class="el" href="structUText.html">UText</a> implementation for UTF-8 strings.  <a href="#32e9e14644d140c3501a7a09e7ad5864"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structUText.html">UText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#df311525bdd2a7f155bbe5cbb4c4de15">utext_openUChars</a> (<a class="el" href="structUText.html">UText</a> *ut, const UChar *s, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> <a class="el" href="ucnv_8h.html#2b811fa5f6e9b580fa0122d38e9849b5">length</a>, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a read-only <a class="el" href="structUText.html">UText</a> for UChar * string.  <a href="#df311525bdd2a7f155bbe5cbb4c4de15"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structUText.html">UText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#8732a0c34ee4764c08f70b7a8d7ca4d4">utext_clone</a> (<a class="el" href="structUText.html">UText</a> *dest, const <a class="el" href="structUText.html">UText</a> *src, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> deep, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> readOnly, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone a <a class="el" href="structUText.html">UText</a>.  <a href="#8732a0c34ee4764c08f70b7a8d7ca4d4"></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="utext_8h.html#592a289ae040b2e610e9aaa9032ce276">utext_equals</a> (const <a class="el" href="structUText.html">UText</a> *a, const <a class="el" href="structUText.html">UText</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="structUText.html">UText</a> objects for equality.  <a href="#592a289ae040b2e610e9aaa9032ce276"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#b6a809d8168c1ccf30746cd57234a59e">utext_nativeLength</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the length of the text.  <a href="#b6a809d8168c1ccf30746cd57234a59e"></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="utext_8h.html#18dd4010f0d9fbe9c920f3ce954990ed">utext_isLengthExpensive</a> (const <a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return TRUE if calculating the length of the text could be expensive.  <a href="#18dd4010f0d9fbe9c920f3ce954990ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#ab911e6df41b5e5a90fd09d2f0aa4fbc">utext_char32At</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the code point at the requested index, or U_SENTINEL (-1) if it is out of bounds.  <a href="#ab911e6df41b5e5a90fd09d2f0aa4fbc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#890bfd8f4c97a85bb70a22eabb34b716">utext_current32</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the code point at the current iteration position, or U_SENTINEL (-1) if the iteration has reached the end of the input text.  <a href="#890bfd8f4c97a85bb70a22eabb34b716"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the code point at the current iteration position of the <a class="el" href="structUText.html">UText</a>, and advance the position to the first index following the character.  <a href="#d4c8e3ba851a3482b2c77cc58cff9ad0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the iterator position to the character (code point) whose index precedes the current position, and return that character.  <a href="#f762d727316244730b78667d12e26dd6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#819b23625de643f71280c076feac31a7">utext_next32From</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the iteration index and return the code point at that index.  <a href="#819b23625de643f71280c076feac31a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#7d12867d3baae5beeb34351e172b5cd8">utext_previous32From</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the iteration index, and return the code point preceding the one specified by the initial index.  <a href="#7d12867d3baae5beeb34351e172b5cd8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#cd28c25814787d3d1620e3edb8f917fd">utext_getNativeIndex</a> (const <a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current iterator position, which can range from 0 to the length of the text.  <a href="#cd28c25814787d3d1620e3edb8f917fd"></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="utext_8h.html#530b4bb7f0e577008e4930f2b39ecd8a">utext_setNativeIndex</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the current iteration position to the nearest code point boundary at or preceding the specified index.  <a href="#530b4bb7f0e577008e4930f2b39ecd8a"></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="utext_8h.html#f91afb68d5059ec704d8d6969288c00d">utext_moveIndex32</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> delta)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the iterator postion by delta code points.  <a href="#f91afb68d5059ec704d8d6969288c00d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#2c703c15aa63fc6555d50feec4f6b3c6">utext_getPreviousNativeIndex</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the native index of the character preceeding the current position.  <a href="#2c703c15aa63fc6555d50feec4f6b3c6"></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="utext_8h.html#ec0833241ef75e474f3dbf4dcf3be9c3">utext_extract</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, UChar *dest, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> destCapacity, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extract text from a <a class="el" href="structUText.html">UText</a> into a UChar buffer.  <a href="#ec0833241ef75e474f3dbf4dcf3be9c3"></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="utext_8h.html#f67295033b5dc1b2951b8b05e5ce9222">utext_isWritable</a> (const <a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return TRUE if the text can be written (modified) with <a class="el" href="utext_8h.html#a781cea4987dda8a7c5f0351e311bf07">utext_replace()</a> or <a class="el" href="utext_8h.html#be74b66b8da9b9de17ea7e59af395c53">utext_copy()</a>.  <a href="#f67295033b5dc1b2951b8b05e5ce9222"></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="utext_8h.html#5ca583f3d6592f6e4d00bd43a9bb4952">utext_hasMetaData</a> (const <a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test whether there is meta data associated with the text.  <a href="#5ca583f3d6592f6e4d00bd43a9bb4952"></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="utext_8h.html#a781cea4987dda8a7c5f0351e311bf07">utext_replace</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, const UChar *replacementText, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> replacementLength, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replace a range of the original text with a replacement text.  <a href="#a781cea4987dda8a7c5f0351e311bf07"></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="utext_8h.html#be74b66b8da9b9de17ea7e59af395c53">utext_copy</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> destIndex, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> move, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy or move a substring from one position to another within the text, while retaining any metadata associated with the text.  <a href="#be74b66b8da9b9de17ea7e59af395c53"></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="utext_8h.html#1ea9abacabf9f48914104dba66d932ff">utext_freeze</a> (<a class="el" href="structUText.html">UText</a> *ut)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structUText.html">UText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utext_8h.html#024e9470afd51e1ae247dcbfbbbe8a67">utext_setup</a> (<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> extraSpace, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Common function for use by Text Provider implementations to allocate and/or initialize a new <a class="el" href="structUText.html">UText</a> struct.  <a href="#024e9470afd51e1ae247dcbfbbbe8a67"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Abstract Unicode Text API. 
<p>
The Text Access API provides a means to allow text that is stored in alternative formats to work with ICU services. ICU normally operates on text that is stored in UTF-16 format, in (UChar *) arrays for the C APIs or as type <a class="el" href="classUnicodeString.html">UnicodeString</a> for C++ APIs.<p>
ICU Text Access allows other formats, such as UTF-8 or non-contiguous UTF-16 strings, to be placed in a <a class="el" href="structUText.html">UText</a> wrapper and then passed to ICU services.<p>
There are three general classes of usage for <a class="el" href="structUText.html">UText</a>:<p>
Application Level Use. This is the simplest usage - applications would use one of the utext_open() functions on their input text, and pass the resulting <a class="el" href="structUText.html">UText</a> to the desired ICU service.<p>
Second is usage in ICU Services, such as break iteration, that will need to operate on input presented to them as a <a class="el" href="structUText.html">UText</a>. These implementations will need to use the iteration and related <a class="el" href="structUText.html">UText</a> functions to gain access to the actual text.<p>
The third class of <a class="el" href="structUText.html">UText</a> users are "text providers." These are the <a class="el" href="structUText.html">UText</a> implementations for the various text storage formats. An application or system with a unique text storage format can implement a set of <a class="el" href="structUText.html">UText</a> provider functions for that format, which will then allow ICU services to operate on that format.<p>
<em>Iterating over text</em><p>
Here is sample code for a forward iteration over the contents of a <a class="el" href="structUText.html">UText</a><p>
<div class="fragment"><pre class="fragment">    <a class="code" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>  c;
    <a class="code" href="structUText.html">UText</a>    *ut = whatever();

    <span class="keywordflow">for</span> (c=<a class="code" href="utext_8h.html#819b23625de643f71280c076feac31a7">utext_next32From</a>(ut, 0); c&gt;=0; c=<a class="code" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32</a>(ut)) {
       <span class="comment">// do whatever with the codepoint c here.</span>
    }
</pre></div><p>
And here is similar code to iterate in the reverse direction, from the end of the text towards the beginning.<p>
<div class="fragment"><pre class="fragment">    <a class="code" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>  c;
    <a class="code" href="structUText.html">UText</a>    *ut = whatever();
    <span class="keywordtype">int</span>      textLength = <a class="code" href="utext_8h.html#b6a809d8168c1ccf30746cd57234a59e">utext_nativeLength</a>(ut);
    <span class="keywordflow">for</span> (c=<a class="code" href="utext_8h.html#7d12867d3baae5beeb34351e172b5cd8">utext_previous32From</a>(ut, textLength); c&gt;=0; c=<a class="code" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32</a>(ut)) {
       <span class="comment">// do whatever with the codepoint c here.</span>
    }
</pre></div><p>
<em>Characters and Indexing</em><p>
Indexing into text by <a class="el" href="structUText.html">UText</a> functions is nearly always in terms of the native indexing of the underlying text storage. The storage format could be UTF-8 or UTF-32, for example. When coding to the <a class="el" href="structUText.html">UText</a> access API, no assumptions can be made regarding the size of characters, or how far an index may move when iterating between characters.<p>
All indices supplied to <a class="el" href="structUText.html">UText</a> functions are pinned to the length of the text. An out-of-bounds index is not considered to be an error, but is adjusted to be in the range 0 &lt;= index &lt;= length of input text.<p>
When an index position is returned from a <a class="el" href="structUText.html">UText</a> function, it will be a native index to the underlying text. In the case of multi-unit characters, it will always refer to the first position of the character, never to the interior. This is essentially the same thing as saying that a returned index will always point to a boundary between characters.<p>
When a native index is supplied to a <a class="el" href="structUText.html">UText</a> function, all indices that refer to any part of a multi-unit character representation are considered to be equivalent. In the case of multi-unit characters, an incoming index will be logically normalized to refer to the start of the character.<p>
It is possible to test whether a native index is on a code point boundary by doing a <a class="el" href="utext_8h.html#530b4bb7f0e577008e4930f2b39ecd8a">utext_setNativeIndex()</a> followed by a <a class="el" href="utext_8h.html#cd28c25814787d3d1620e3edb8f917fd">utext_getNativeIndex()</a>. If the index is returned unchanged, it was on a code point boundary. If an adjusted index is returned, the original index referred to the interior of a character.<p>
<em>Conventions for calling <a class="el" href="structUText.html">UText</a> functions</em><p>
Most <a class="el" href="structUText.html">UText</a> access functions have as their first parameter a (<a class="el" href="structUText.html">UText</a> *) pointer, which specifies the <a class="el" href="structUText.html">UText</a> to be used. Unless otherwise noted, the pointer must refer to a valid, open <a class="el" href="structUText.html">UText</a>. Attempting to use a closed <a class="el" href="structUText.html">UText</a> or passing a NULL pointer is a programming error and will produce undefined results or NULL pointer exceptions.<p>
The UText_Open family of functions can either open an existing (closed) <a class="el" href="structUText.html">UText</a>, or heap allocate a new <a class="el" href="structUText.html">UText</a>. Here is sample code for creating a stack-allocated <a class="el" href="structUText.html">UText</a>.<p>
<div class="fragment"><pre class="fragment">    <span class="keywordtype">char</span>     *s = whatever();  <span class="comment">// A utf-8 string </span>
    U_ErrorCode status = <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78ca43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;
    <a class="code" href="structUText.html">UText</a>    ut = <a class="code" href="utext_8h.html#3dc916f710c0d3f17fe2a220384bcc8c">UTEXT_INITIALIZER</a>;
    <a class="code" href="utext_8h.html#32e9e14644d140c3501a7a09e7ad5864">utext_openUTF8</a>(ut, s, -1, &amp;status);
    <span class="keywordflow">if</span> (<a class="code" href="utypes_8h.html#4d202200b6aa6f3c965ea370e0c8155f">U_FAILURE</a>(status)) {
        <span class="comment">// error handling</span>
    } <span class="keywordflow">else</span> {
        <span class="comment">// work with the UText</span>
    }
</pre></div><p>
Any existing <a class="el" href="structUText.html">UText</a> passed to an open function _must_ have been initialized, either by the UTEXT_INITIALIZER, or by having been originally heap-allocated by an open function. Passing NULL will cause the open function to heap-allocate and fully initialize a new <a class="el" href="structUText.html">UText</a>. 
<p>
Definition in file <a class="el" href="utext_8h-source.html">utext.h</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="23a003b461019bea876827b8b24cb364"></a><!-- doxytag: member="utext.h::UTEXT_GETNATIVEINDEX" ref="23a003b461019bea876827b8b24cb364" args="(ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UTEXT_GETNATIVEINDEX          </td>
          <td>(</td>
          <td class="paramtype">ut&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">((ut)-&gt;chunkOffset &lt;= (ut)-&gt;nativeIndexingLimit?   \
        (ut)-&gt;chunkNativeStart+(ut)-&gt;chunkOffset :     \
        (ut)-&gt;pFuncs-&gt;mapOffsetToNative(ut))
</pre></div>inline version of <a class="el" href="utext_8h.html#cd28c25814787d3d1620e3edb8f917fd">utext_getNativeIndex()</a>, for performance-critical situations. 
<p>
Get the current iterator position, which can range from 0 to the length of the text. The position is a native index into the input text, in whatever format it may have (possibly UTF-8 for example), and may not always be the same as the corresponding UChar (UTF-16) index. The returned position will always be aligned to a code point boundary.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001809">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00715">715</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="3dc916f710c0d3f17fe2a220384bcc8c"></a><!-- doxytag: member="utext.h::UTEXT_INITIALIZER" ref="3dc916f710c0d3f17fe2a220384bcc8c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UTEXT_INITIALIZER          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{                                        \
                  UTEXT_MAGIC,          <span class="comment">/* magic                */</span> \
                  0,                    <span class="comment">/* flags                */</span> \
                  0,                    <span class="comment">/* providerProps        */</span> \
                  <span class="keyword">sizeof</span>(<a class="code" href="structUText.html">UText</a>),        <span class="comment">/* sizeOfStruct         */</span> \
                  0,                    <span class="comment">/* chunkNativeLimit     */</span> \
                  0,                    <span class="comment">/* extraSize            */</span> \
                  0,                    <span class="comment">/* nativeIndexingLimit  */</span> \
                  0,                    <span class="comment">/* chunkNativeStart     */</span> \
                  0,                    <span class="comment">/* chunkOffset          */</span> \
                  0,                    <span class="comment">/* chunkLength          */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,                 <span class="comment">/* chunkContents        */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,                 <span class="comment">/* pFuncs               */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,                 <span class="comment">/* pExtra               */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,                 <span class="comment">/* context              */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,     <span class="comment">/* p, q, r              */</span> \
                  <a class="code" href="utypes_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>,                 <span class="comment">/* privP                */</span> \
                  0, 0, 0,              <span class="comment">/* a, b, c              */</span> \
                  0, 0, 0               <span class="comment">/* privA,B,C,           */</span> \
                  }
</pre></div>initializer to be used with local (stack) instances of a <a class="el" href="structUText.html">UText</a> struct. 
<p>
<a class="el" href="structUText.html">UText</a> structs must be initialized before passing them to one of the utext_open functions.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001828">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01532">1532</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="a4b973aeeb5f10f8aec454545f85b6a2"></a><!-- doxytag: member="utext.h::UTEXT_NEXT32" ref="a4b973aeeb5f10f8aec454545f85b6a2" args="(ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UTEXT_NEXT32          </td>
          <td>(</td>
          <td class="paramtype">ut&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">((ut)-&gt;chunkOffset &lt; (ut)-&gt;chunkLength &amp;&amp; ((ut)-&gt;chunkContents)[(ut)-&gt;chunkOffset]&lt;0xd800 ? \
    ((ut)-&gt;chunkContents)[((ut)-&gt;chunkOffset)++] : <a class="code" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32</a>(ut))
</pre></div>inline version of <a class="el" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32()</a>, for performance-critical situations. 
<p>
Get the code point at the current iteration position of the <a class="el" href="structUText.html">UText</a>, and advance the position to the first index following the character. This is a post-increment operation. Returns U_SENTINEL (-1) if the position is at the end of the text.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001807">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00684">684</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="8aa3d9bae7b252622fe8e70e87758205"></a><!-- doxytag: member="utext.h::UTEXT_PREVIOUS32" ref="8aa3d9bae7b252622fe8e70e87758205" args="(ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UTEXT_PREVIOUS32          </td>
          <td>(</td>
          <td class="paramtype">ut&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">((ut)-&gt;chunkOffset &gt; 0 &amp;&amp; \
     (ut)-&gt;chunkContents[(ut)-&gt;chunkOffset-1] &lt; 0xd800 ? \
          (ut)-&gt;chunkContents[--((ut)-&gt;chunkOffset)]  :  <a class="code" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32</a>(ut))
</pre></div>inline version of <a class="el" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32()</a>, for performance-critical situations. 
<p>
Move the iterator position to the character (code point) whose index precedes the current position, and return that character. This is a pre-decrement operation. Returns U_SENTINEL (-1) if the position is at the start of the text.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001808">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00698">698</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="74aa6ff1add5886508657997ca8d4747"></a><!-- doxytag: member="utext.h::UTEXT_SETNATIVEINDEX" ref="74aa6ff1add5886508657997ca8d4747" args="(ut, ix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UTEXT_SETNATIVEINDEX          </td>
          <td>(</td>
          <td class="paramtype">ut,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ix&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">{ <a class="code" href="platform_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> __offset = (ix) - (ut)-&gt;chunkNativeStart; \
      <span class="keywordflow">if</span> (__offset&gt;=0 &amp;&amp; __offset&lt;=(<a class="code" href="platform_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>)(ut)-&gt;nativeIndexingLimit) { \
          (ut)-&gt;chunkOffset=(<a class="code" href="platform_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>)__offset; \
      } <span class="keywordflow">else</span> { \
          <a class="code" href="utext_8h.html#530b4bb7f0e577008e4930f2b39ecd8a">utext_setNativeIndex</a>((ut), (ix)); } }
</pre></div>inline version of <a class="el" href="utext_8h.html#530b4bb7f0e577008e4930f2b39ecd8a">utext_setNativeIndex()</a>, for performance-critical situations. 
<p>
Set the current iteration position to the nearest code point boundary at or preceding the specified index. The index is in the native units of the original input text. If the index is out of range, it will be pinned to be within the range of the input text.<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000030">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.8 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00731">731</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="8da22111033cc0c063d89cae348ec1e4"></a><!-- doxytag: member="utext.h::UText" ref="8da22111033cc0c063d89cae348ec1e4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structUText.html">UText</a> <a class="el" href="structUText.html">UText</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
C typedef for struct <a class="el" href="structUText.html">UText</a>. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001788">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00149">149</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="1f5dc096a853eaa7e03790b0ed14b8de"></a><!-- doxytag: member="utext.h::UTextAccess" ref="1f5dc096a853eaa7e03790b0ed14b8de" args="(UText *ut, int64_t nativeIndex, UBool forward)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> U_CALLCONV <a class="el" href="utext_8h.html#1f5dc096a853eaa7e03790b0ed14b8de">UTextAccess</a>(<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> forward)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.access(). 
<p>
Get the description of the text chunk containing the text at a requested native index. The UText's iteration position will be left at the requested index. If the index is out of bounds, the iteration position will be left at the start or end of the string, as appropriate.<p>
Chunks must begin and end on code point boundaries. A single code point comprised of multiple storage units must never span a chunk boundary.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> being accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>Requested index of the text to be accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>forward</em>&nbsp;</td><td>If TRUE, then the returned chunk must contain text starting from the index, so that start&lt;=index&lt;limit. If FALSE, then the returned chunk must contain text before the index, so that start&lt;index&lt;=limit. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the requested index could be accessed. The chunk will contain the requested text. False value if a chunk cannot be accessed (the requested index is out of bounds).</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="structUText.html">UText</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001818">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01003">1003</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="3ca63bcf657509e4604d70434d6a83d4"></a><!-- doxytag: member="utext.h::UTextClone" ref="3ca63bcf657509e4604d70434d6a83d4" args="(UText *dest, const UText *src, UBool deep, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structUText.html">UText</a>* U_CALLCONV <a class="el" href="utext_8h.html#3ca63bcf657509e4604d70434d6a83d4">UTextClone</a>(<a class="el" href="structUText.html">UText</a> *dest, const <a class="el" href="structUText.html">UText</a> *src, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> deep, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.clone(). 
<p>
clone a <a class="el" href="structUText.html">UText</a>. Much like opening a <a class="el" href="structUText.html">UText</a> where the source text is itself another <a class="el" href="structUText.html">UText</a>.<p>
A deep clone will copy both the <a class="el" href="structUText.html">UText</a> data structures and the underlying text. The original and cloned <a class="el" href="structUText.html">UText</a> will operate completely independently; modifications made to the text in one will not effect the other. Text providers are not required to support deep clones. The user of clone() must check the status return and be prepared to handle failures.<p>
A shallow clone replicates only the <a class="el" href="structUText.html">UText</a> data structures; it does not make a copy of the underlying text. Shallow clones can be used as an efficient way to have multiple iterators active in a single text string that is not being modified.<p>
A shallow clone operation must not fail except for truly exceptional conditions such as memory allocation failures.<p>
A <a class="el" href="structUText.html">UText</a> and its clone may be safely concurrently accessed by separate threads. This is true for both shallow and deep clones. It is the responsibility of the Text Provider to ensure that this thread safety constraint is met.<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>dest</em>&nbsp;</td><td>A <a class="el" href="structUText.html">UText</a> struct to be filled in with the result of the clone operation, or NULL if the clone function should heap-allocate a new <a class="el" href="structUText.html">UText</a> struct. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> to be cloned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>deep</em>&nbsp;</td><td>TRUE to request a deep clone, FALSE for a shallow clone. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR should be returned if the text provider is unable to clone the original text. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The newly created clone, or NULL if the clone operation failed.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001816">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00963">963</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="c52b52c9fb86271888ea96e58910b2f6"></a><!-- doxytag: member="utext.h::UTextClose" ref="c52b52c9fb86271888ea96e58910b2f6" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="utext_8h.html#c52b52c9fb86271888ea96e58910b2f6">UTextClose</a>(<a class="el" href="structUText.html">UText</a> *ut)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.utextClose(). 
<p>
A Text Provider close function is only required for provider types that make allocations in their open function (or other functions) that must be cleaned when the <a class="el" href="structUText.html">UText</a> is closed.<p>
The allocation of the <a class="el" href="structUText.html">UText</a> struct itself and any "extra" storage associated with the <a class="el" href="structUText.html">UText</a> is handled by the common <a class="el" href="structUText.html">UText</a> implementation and does not require provider specific cleanup in a close function.<p>
Most <a class="el" href="structUText.html">UText</a> provider implementations do not need to implement this function.<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>ut</em>&nbsp;</td><td>A <a class="el" href="structUText.html">UText</a> object to be closed.</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001824">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01161">1161</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="b8abccd00ffedf836bd6cbf6ce160583"></a><!-- doxytag: member="utext.h::UTextCopy" ref="b8abccd00ffedf836bd6cbf6ce160583" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t nativeDest, UBool move, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="utext_8h.html#b8abccd00ffedf836bd6cbf6ce160583">UTextCopy</a>(<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeDest, <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> move, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.copy(). 
<p>
Copy or move a substring from one position to another within the text, while retaining any metadata associated with the text. This function is used to duplicate or reorder substrings. The destination index must not overlap the source range.<p>
The text to be copied or moved is inserted at destIndex; it does not replace or overwrite any existing text.<p>
This function need only be implemented for <a class="el" href="structUText.html">UText</a> types that support writing.<p>
When using this function, there should be only a single <a class="el" href="structUText.html">UText</a> opened onto the underlying native text string. The function is responsible for updating the text chunk within the <a class="el" href="structUText.html">UText</a> to reflect the updated iteration position, taking into account any changes to the underlying string's structure caused by the replace operation.<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>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> representing the text to be operated on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>The index of the start of the region to be copied or moved </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>The index of the character following the region to be replaced. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeDest</em>&nbsp;</td><td>The destination index to which the source substring is copied or moved. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>move</em>&nbsp;</td><td>If TRUE, then the substring is moved, not copied/duplicated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. Possible errors include U_NO_WRITE_PERMISSION</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001821">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01102">1102</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="e1f71e9cae273d006c72f2ab3f6143c9"></a><!-- doxytag: member="utext.h::UTextExtract" ref="e1f71e9cae273d006c72f2ab3f6143c9" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, UChar *dest, int32_t destCapacity, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV <a class="el" href="utext_8h.html#e1f71e9cae273d006c72f2ab3f6143c9">UTextExtract</a>(<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, UChar *dest, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> destCapacity, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.extract(). 
<p>
Extract text from a <a class="el" href="structUText.html">UText</a> into a UChar buffer. The range of text to be extracted is specified in the native indices of the <a class="el" href="structUText.html">UText</a> provider. These may not necessarily be UTF-16 indices. <p>
The size (number of 16 bit UChars) in the data to be extracted is returned. The full amount is returned, even when the specified buffer size is smaller. <p>
The extracted string will (if you are a user) / must (if you are a text provider) be NUL-terminated if there is sufficient space in the destination buffer.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> from which to extract data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>the native index of the first characer to extract. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>the native string index of the position following the last character to extract. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>the UChar (UTF-16) buffer into which the extracted text is placed </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>The size, in UChars, of the destination buffer. May be zero for precomputing the required size. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. If U_BUFFER_OVERFLOW_ERROR: Returns number of UChars for preflighting. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of UChars in the data. Does not include a trailing NUL.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001819">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01033">1033</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="ce2f4d9b593cbedc97413bbdb6210c10"></a><!-- doxytag: member="utext.h::UTextMapNativeIndexToUTF16" ref="ce2f4d9b593cbedc97413bbdb6210c10" args="(const UText *ut, int64_t nativeIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV <a class="el" href="utext_8h.html#ce2f4d9b593cbedc97413bbdb6210c10">UTextMapNativeIndexToUTF16</a>(const <a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeIndex)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.mapIndexToUTF16(). 
<p>
Map from a native index to a UChar offset within a text chunk. Behavior is undefined if the native index does not fall within the current chunk.<p>
This function is required only for text providers that do not use native UTF-16 indexes.<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>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> containing the text chunk. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>Absolute (native) text index, chunk-&gt;start&lt;=index&lt;=chunk-&gt;limit. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Chunk-relative UTF-16 offset corresponding to the specified native index.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001823">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01140">1140</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="6ae2a19d39d565c5610eb3a2ccf0518b"></a><!-- doxytag: member="utext.h::UTextMapOffsetToNative" ref="6ae2a19d39d565c5610eb3a2ccf0518b" args="(const UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> U_CALLCONV <a class="el" href="utext_8h.html#6ae2a19d39d565c5610eb3a2ccf0518b">UTextMapOffsetToNative</a>(const <a class="el" href="structUText.html">UText</a> *ut)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.mapOffsetToNative(). 
<p>
Map from the current UChar offset within the current text chunk to the corresponding native index in the original source text.<p>
This is required only for text providers that do not use native UTF-16 indexes.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a>. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Absolute (native) index corresponding to chunkOffset in the current chunk. The returned native index should always be to a code point boundary.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001822">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01122">1122</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="ea56c4f0245b449fb5a3346c6fe3e022"></a><!-- doxytag: member="utext.h::UTextNativeLength" ref="ea56c4f0245b449fb5a3346c6fe3e022" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> U_CALLCONV <a class="el" href="utext_8h.html#ea56c4f0245b449fb5a3346c6fe3e022">UTextNativeLength</a>(<a class="el" href="structUText.html">UText</a> *ut)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.nativeLength(). 
<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> to get the length of. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the length, in the native units of the original text string. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="structUText.html">UText</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001817">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00975">975</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="4c911f2b913e270fbaf55a58aad909b4"></a><!-- doxytag: member="utext.h::UTextReplace" ref="4c911f2b913e270fbaf55a58aad909b4" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, const UChar *replacementText, int32_t replacmentLength, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> U_CALLCONV <a class="el" href="utext_8h.html#4c911f2b913e270fbaf55a58aad909b4">UTextReplace</a>(<a class="el" href="structUText.html">UText</a> *ut, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeStart, <a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> nativeLimit, const UChar *replacementText, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> replacmentLength, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function type declaration for UText.replace(). 
<p>
Replace a range of the original text with a replacement text.<p>
Leaves the current iteration position at the position following the newly inserted replacement text.<p>
This function need only be implemented on <a class="el" href="structUText.html">UText</a> types that support writing.<p>
When using this function, there should be only a single <a class="el" href="structUText.html">UText</a> opened onto the underlying native text string. The function is responsible for updating the text chunk within the <a class="el" href="structUText.html">UText</a> to reflect the updated iteration position, taking into account any changes to the underlying string's structure caused by the replace operation.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> representing the text to be operated on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>the index of the start of the region to be replaced </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>the index of the character following the region to be replaced. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replacementText</em>&nbsp;</td><td>pointer to the replacement text </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replacmentLength</em>&nbsp;</td><td>length of the replacement text in UChars, or -1 if the text is NUL terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. Possible errors include U_NO_WRITE_PERMISSION</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The signed number of (native) storage units by which the length of the text expanded or contracted.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001820">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01068">1068</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="bc5c98fcc1211af2b80116dd6e0a035d"></a><!-- doxytag: member="utext.h::@11" ref="bc5c98fcc1211af2b80116dd6e0a035d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="structUText.html">UText</a> provider properties (bit field indexes). 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="structUText.html">UText</a> </dd></dl>
<dl compact><dt><b>Stable:</b></dt><dd>ICU 3.4 </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="bc5c98fcc1211af2b80116dd6e0a035d752c07f9df260b5b0e234e15eab97f9f"></a><!-- doxytag: member="UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE" ref="bc5c98fcc1211af2b80116dd6e0a035d752c07f9df260b5b0e234e15eab97f9f" args="" -->UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE</em>&nbsp;</td><td>
It is potentially time consuming for the provider to determine the length of the text. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001829">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="bc5c98fcc1211af2b80116dd6e0a035d52bb5c9cacd1f46eb87a856c71c073be"></a><!-- doxytag: member="UTEXT_PROVIDER_STABLE_CHUNKS" ref="bc5c98fcc1211af2b80116dd6e0a035d52bb5c9cacd1f46eb87a856c71c073be" args="" -->UTEXT_PROVIDER_STABLE_CHUNKS</em>&nbsp;</td><td>
Text chunks remain valid and usable until the text object is modified or deleted, not just until the next time the access() function is called (which is the default). 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001830">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="bc5c98fcc1211af2b80116dd6e0a035dc67ce6ecf6bf959645e282f7194fbe3b"></a><!-- doxytag: member="UTEXT_PROVIDER_WRITABLE" ref="bc5c98fcc1211af2b80116dd6e0a035dc67ce6ecf6bf959645e282f7194fbe3b" args="" -->UTEXT_PROVIDER_WRITABLE</em>&nbsp;</td><td>
The provider supports modifying the text via the replace() and copy() functions. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classReplaceable.html">Replaceable</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001831">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="bc5c98fcc1211af2b80116dd6e0a035d40c5cd24aea472f3752b4833b9ce63ca"></a><!-- doxytag: member="UTEXT_PROVIDER_HAS_META_DATA" ref="bc5c98fcc1211af2b80116dd6e0a035d40c5cd24aea472f3752b4833b9ce63ca" args="" -->UTEXT_PROVIDER_HAS_META_DATA</em>&nbsp;</td><td>
There is meta data associated with the text. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classReplaceable.html#1ed55c4d22c82de002854c53b76eb0b6">Replaceable::hasMetaData()</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001832">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="bc5c98fcc1211af2b80116dd6e0a035d75695072a896ec104b5d77598a7429f7"></a><!-- doxytag: member="UTEXT_PROVIDER_OWNS_TEXT" ref="bc5c98fcc1211af2b80116dd6e0a035d75695072a896ec104b5d77598a7429f7" args="" -->UTEXT_PROVIDER_OWNS_TEXT</em>&nbsp;</td><td>
Text provider owns the text storage. 
<p>
Generally occurs as the result of a deep clone of the <a class="el" href="structUText.html">UText</a>. When closing the <a class="el" href="structUText.html">UText</a>, the associated text must also be closed/deleted/freed/ whatever is appropriate. <dl compact><dt><b><a class="el" href="stable.html#_stable001833">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l00889">889</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<a class="anchor" name="c36f475ca5b446f4fde4c9b90bec77c8"></a><!-- doxytag: member="utext.h::@12" ref="c36f475ca5b446f4fde4c9b90bec77c8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>Internal:</b></dt><dd>Do not use. This API is for interal use only. Value used to help identify correctly initialized <a class="el" href="structUText.html">UText</a> structs. Note: must be publicly visible so that UTEXT_INITIALIZER can access it. </dd></dl>

<p>
Definition at line <a class="el" href="utext_8h-source.html#l01521">1521</a> of file <a class="el" href="utext_8h-source.html">utext.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ab911e6df41b5e5a90fd09d2f0aa4fbc"></a><!-- doxytag: member="utext.h::utext_char32At" ref="ab911e6df41b5e5a90fd09d2f0aa4fbc" args="(UText *ut, int64_t nativeIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_char32At           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeIndex</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 code point at the requested index, or U_SENTINEL (-1) if it is out of bounds. 
<p>
If the specified index points to the interior of a multi-unit character - one of the trail bytes of a UTF-8 sequence, for example - the complete code point will be returned.<p>
The iteration position will be set to the start of the returned code point.<p>
This function is roughly equivalent to the the sequence utext_setNativeIndex(index); <a class="el" href="utext_8h.html#890bfd8f4c97a85bb70a22eabb34b716">utext_current32()</a>; (There is a subtle difference if the index is out of bounds by being less than zero - utext_setNativeIndex(negative value) sets the index to zero, after which utext_current() will return the char at zero. utext_char32At(negative index), on the other hand, will return the U_SENTINEL value of -1.)<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>ut</em>&nbsp;</td><td>the text to be accessed </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>the native index of the character to be accessed. If the index points to other than the first unit of a multi-unit character, it will be adjusted to the start of the character. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the code point at the specified index. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001796">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="8732a0c34ee4764c08f70b7a8d7ca4d4"></a><!-- doxytag: member="utext.h::utext_clone" ref="8732a0c34ee4764c08f70b7a8d7ca4d4" args="(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUText.html">UText</a>* utext_clone           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>deep</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>readOnly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clone a <a class="el" href="structUText.html">UText</a>. 
<p>
This is much like opening a <a class="el" href="structUText.html">UText</a> where the source text is itself another <a class="el" href="structUText.html">UText</a>.<p>
A deep clone will copy both the <a class="el" href="structUText.html">UText</a> data structures and the underlying text. The original and cloned <a class="el" href="structUText.html">UText</a> will operate completely independently; modifications made to the text in one will not affect the other. Text providers are not required to support deep clones. The user of clone() must check the status return and be prepared to handle failures.<p>
The standard <a class="el" href="structUText.html">UText</a> implementations for UTF8, UChar *, <a class="el" href="classUnicodeString.html">UnicodeString</a> and <a class="el" href="classReplaceable.html">Replaceable</a> all support deep cloning.<p>
The <a class="el" href="structUText.html">UText</a> returned from a deep clone will be writable, assuming that the text provider is able to support writing, even if the source <a class="el" href="structUText.html">UText</a> had been made non-writable by means of UText_freeze().<p>
A shallow clone replicates only the <a class="el" href="structUText.html">UText</a> data structures; it does not make a copy of the underlying text. Shallow clones can be used as an efficient way to have multiple iterators active in a single text string that is not being modified.<p>
A shallow clone operation will not fail, barring truly exceptional conditions such as memory allocation failures.<p>
Shallow <a class="el" href="structUText.html">UText</a> clones should be avoided if the <a class="el" href="structUText.html">UText</a> functions that modify the text are expected to be used, either on the original or the cloned <a class="el" href="structUText.html">UText</a>. Any such modifications can cause unpredictable behavior. Read Only shallow clones provide some protection against errors of this type by disabling text modification via the cloned <a class="el" href="structUText.html">UText</a>.<p>
A shallow clone made with the readOnly parameter == FALSE will preserve the <a class="el" href="utext_8h.html#f67295033b5dc1b2951b8b05e5ce9222">utext_isWritable()</a> state of the source object. Note, however, that write operations must be avoided while more than one <a class="el" href="structUText.html">UText</a> exists that refer to the same underlying text.<p>
A <a class="el" href="structUText.html">UText</a> and its clone may be safely concurrently accessed by separate threads. This is true for read access only with shallow clones, and for both read and write access with deep clones. It is the responsibility of the Text Provider to ensure that this thread safety constraint is met.<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>dest</em>&nbsp;</td><td>A <a class="el" href="structUText.html">UText</a> struct to be filled in with the result of the clone operation, or NULL if the clone function should heap-allocate a new <a class="el" href="structUText.html">UText</a> struct. If non-NULL, must refer to an already existing <a class="el" href="structUText.html">UText</a>, which will then be reset to become the clone. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> to be cloned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>deep</em>&nbsp;</td><td>TRUE to request a deep clone, FALSE for a shallow clone. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>readOnly</em>&nbsp;</td><td>TRUE to request that the cloned <a class="el" href="structUText.html">UText</a> have read only access to the underlying text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR will be returned if the text provider is unable to clone the original text. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The newly created clone, or NULL if the clone operation failed. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001792">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="303eb28b0f98498dfcb063e05ab2695c"></a><!-- doxytag: member="utext.h::utext_close" ref="303eb28b0f98498dfcb063e05ab2695c" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUText.html">UText</a>* utext_close           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close function for <a class="el" href="structUText.html">UText</a> instances. 
<p>
Cleans up, releases any resources being held by an open <a class="el" href="structUText.html">UText</a>. <p>
If the <a class="el" href="structUText.html">UText</a> was originally allocated by one of the utext_open functions, the storage associated with the utext will also be freed. If the <a class="el" href="structUText.html">UText</a> storage originated with the application, as it would with a local or static instance, the storage will not be deleted.<p>
An open <a class="el" href="structUText.html">UText</a> can be reset to refer to new string by using one of the utext_open() functions without first closing the <a class="el" href="structUText.html">UText</a>.<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>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> to be closed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>NULL if the <a class="el" href="structUText.html">UText</a> struct was deleted by the close. If the <a class="el" href="structUText.html">UText</a> struct was originally provided by the caller to the open function, it is returned by this function, and may be safely used again in a subsequent utext_open.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001789">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="be74b66b8da9b9de17ea7e59af395c53"></a><!-- doxytag: member="utext.h::utext_copy" ref="be74b66b8da9b9de17ea7e59af395c53" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t destIndex, UBool move, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void utext_copy           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>destIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>move</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy or move a substring from one position to another within the text, while retaining any metadata associated with the text. 
<p>
This function is used to duplicate or reorder substrings. The destination index must not overlap the source range.<p>
The text to be copied or moved is inserted at destIndex; it does not replace or overwrite any existing text.<p>
The iteration position is left following the newly inserted text at the destination position.<p>
This function is only available on <a class="el" href="structUText.html">UText</a> types that support writing, that is, ones where <a class="el" href="utext_8h.html#f67295033b5dc1b2951b8b05e5ce9222">utext_isWritable()</a> returns TRUE.<p>
When using this function, there should be only a single <a class="el" href="structUText.html">UText</a> opened onto the underlying native text string. Behavior after a copy operation on a <a class="el" href="structUText.html">UText</a> is undefined in any other additional UTexts that refer to the modified string.<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>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> representing the text to be operated on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>The native index of the start of the region to be copied or moved </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>The native index of the character position following the region to be copied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destIndex</em>&nbsp;</td><td>The native destination index to which the source substring is copied or moved. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>move</em>&nbsp;</td><td>If TRUE, then the substring is moved, not copied/duplicated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. Possible errors include U_NO_WRITE_PERMISSION</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001813">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="890bfd8f4c97a85bb70a22eabb34b716"></a><!-- doxytag: member="utext.h::utext_current32" ref="890bfd8f4c97a85bb70a22eabb34b716" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_current32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the code point at the current iteration position, or U_SENTINEL (-1) if the iteration has reached the end of the input 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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the Unicode code point at the current iterator position. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001797">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="592a289ae040b2e610e9aaa9032ce276"></a><!-- doxytag: member="utext.h::utext_equals" ref="592a289ae040b2e610e9aaa9032ce276" args="(const UText *a, const UText *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> utext_equals           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>b</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>
Compare two <a class="el" href="structUText.html">UText</a> objects for equality. 
<p>
UTexts are equal if they are iterating over the same text, and have the same iteration position within the text. If either or both of the parameters are NULL, the comparison is FALSE.<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>a</em>&nbsp;</td><td>The first of the two UTexts to compare. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>The other <a class="el" href="structUText.html">UText</a> to be compared. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the two UTexts are equal. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001793">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ec0833241ef75e474f3dbf4dcf3be9c3"></a><!-- doxytag: member="utext.h::utext_extract" ref="ec0833241ef75e474f3dbf4dcf3be9c3" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, UChar *dest, int32_t destCapacity, UErrorCode *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> utext_extract           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UChar *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Extract text from a <a class="el" href="structUText.html">UText</a> into a UChar buffer. 
<p>
The range of text to be extracted is specified in the native indices of the <a class="el" href="structUText.html">UText</a> provider. These may not necessarily be UTF-16 indices. <p>
The size (number of 16 bit UChars) of the data to be extracted is returned. The full number of UChars is returned, even when the extracted text is truncated because the specified buffer size is too small. <p>
The extracted string will (if you are a user) / must (if you are a text provider) be NUL-terminated if there is sufficient space in the destination buffer. This terminating NUL is not included in the returned length. <p>
The iteration index is left at the position following the last extracted character.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> from which to extract data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>the native index of the first character to extract.\ If the specified index is out of range, it will be pinned to to be within 0 &lt;= index &lt;= textLength </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>the native string index of the position following the last character to extract. If the specified index is out of range, it will be pinned to to be within 0 &lt;= index &lt;= textLength. nativeLimit must be &gt;= nativeStart. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>the UChar (UTF-16) buffer into which the extracted text is placed </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>The size, in UChars, of the destination buffer. May be zero for precomputing the required size. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. U_BUFFER_OVERFLOW_ERROR: the extracted text was truncated because the buffer was too small. Returns number of UChars for preflighting. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of UChars in the data to be extracted. Does not include a trailing NUL.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001806">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1ea9abacabf9f48914104dba66d932ff"></a><!-- doxytag: member="utext.h::utext_freeze" ref="1ea9abacabf9f48914104dba66d932ff" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void utext_freeze           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Freeze a <a class="el" href="structUText.html">UText</a>. This prevents any modification to the underlying text itself by means of functions operating on this <a class="el" href="structUText.html">UText</a>.  <p>
Once frozen, a <a class="el" href="structUText.html">UText</a> can not be unfrozen. The intent is to ensure that a the text underlying a frozen <a class="el" href="structUText.html">UText</a> wrapper cannot be modified via that <a class="el" href="structUText.html">UText</a>.  <p>
Caution: freezing a <a class="el" href="structUText.html">UText</a> will disable changes made via the specific frozen <a class="el" href="structUText.html">UText</a> wrapper only; it will not have any effect on the ability to directly modify the text by bypassing the <a class="el" href="structUText.html">UText</a>. Any such backdoor modifications are always an error while <a class="el" href="structUText.html">UText</a> access is occuring because the underlying text can get out of sync with UText's buffering. <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>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> to be frozen. </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="utext_8h.html#f67295033b5dc1b2951b8b05e5ce9222">utext_isWritable()</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001814">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="cd28c25814787d3d1620e3edb8f917fd"></a><!-- doxytag: member="utext.h::utext_getNativeIndex" ref="cd28c25814787d3d1620e3edb8f917fd" args="(const UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> utext_getNativeIndex           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current iterator position, which can range from 0 to the length of the text. 
<p>
The position is a native index into the input text, in whatever format it may have (possibly UTF-8 for example), and may not always be the same as the corresponding UChar (UTF-16) index. The returned position will always be aligned to a code point boundary.<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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the current index position, in the native units of the text provider. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001802">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="2c703c15aa63fc6555d50feec4f6b3c6"></a><!-- doxytag: member="utext.h::utext_getPreviousNativeIndex" ref="2c703c15aa63fc6555d50feec4f6b3c6" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> utext_getPreviousNativeIndex           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the native index of the character preceeding the current position. 
<p>
If the iteration position is already at the start of the text, zero is returned. The value returned is the same as that obtained from the following sequence, but without the side effect of changing the iteration position.<p>
<div class="fragment"><pre class="fragment">    <a class="code" href="structUText.html">UText</a>  *ut = whatever;
      ...
    utext_previous(ut)
    <a class="code" href="utext_8h.html#cd28c25814787d3d1620e3edb8f917fd">utext_getNativeIndex</a>(ut);
</pre></div><p>
This function is most useful during forwards iteration, where it will get the native index of the character most recently returned from utext_next().<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>ut</em>&nbsp;</td><td>the text to be accessed </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the native index of the character preceeding the current index position, or zero if the current position is at the start of the text. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001805">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="5ca583f3d6592f6e4d00bd43a9bb4952"></a><!-- doxytag: member="utext.h::utext_hasMetaData" ref="5ca583f3d6592f6e4d00bd43a9bb4952" args="(const UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> utext_hasMetaData           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Test whether there is meta data associated with the text. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classReplaceable.html#1ed55c4d22c82de002854c53b76eb0b6">Replaceable::hasMetaData()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ut</em>&nbsp;</td><td>The <a class="el" href="structUText.html">UText</a> to be tested </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the underlying text includes meta data. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001811">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="18dd4010f0d9fbe9c920f3ce954990ed"></a><!-- doxytag: member="utext.h::utext_isLengthExpensive" ref="18dd4010f0d9fbe9c920f3ce954990ed" args="(const UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> utext_isLengthExpensive           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return TRUE if calculating the length of the text could be expensive. 
<p>
Finding the length of NUL terminated strings is considered to be expensive.<p>
Note that the value of this function may change as the result of other operations on a <a class="el" href="structUText.html">UText</a>. Once the length of a string has been discovered, it will no longer be expensive to report it.<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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if determining the length of the text could be time consuming. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001795">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f67295033b5dc1b2951b8b05e5ce9222"></a><!-- doxytag: member="utext.h::utext_isWritable" ref="f67295033b5dc1b2951b8b05e5ce9222" args="(const UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> utext_isWritable           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return TRUE if the text can be written (modified) with <a class="el" href="utext_8h.html#a781cea4987dda8a7c5f0351e311bf07">utext_replace()</a> or <a class="el" href="utext_8h.html#be74b66b8da9b9de17ea7e59af395c53">utext_copy()</a>. 
<p>
For the text to be writable, the text provider must be of a type that supports writing and the <a class="el" href="structUText.html">UText</a> must not be frozen.<p>
Attempting to modify text when utext_isWriteable() is FALSE will fail - the text will not be modified, and an error will be returned from the function that attempted the modification.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> to be tested. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the text is modifiable.</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="utext_8h.html#1ea9abacabf9f48914104dba66d932ff">utext_freeze()</a> <p>
<a class="el" href="utext_8h.html#a781cea4987dda8a7c5f0351e311bf07">utext_replace()</a> <p>
<a class="el" href="utext_8h.html#be74b66b8da9b9de17ea7e59af395c53">utext_copy()</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001810">Stable:</a></b></dt><dd>ICU 3.4</dd></dl>

</div>
</div><p>
<a class="anchor" name="f91afb68d5059ec704d8d6969288c00d"></a><!-- doxytag: member="utext.h::utext_moveIndex32" ref="f91afb68d5059ec704d8d6969288c00d" args="(UText *ut, int32_t delta)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> utext_moveIndex32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>delta</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>
Move the iterator postion by delta code points. 
<p>
The number of code points is a signed number; a negative delta will move the iterator backwards, towards the start of the text. <p>
The index is moved by <code>delta</code> code points forward or backward, but no further backward than to 0 and no further forward than to <a class="el" href="utext_8h.html#b6a809d8168c1ccf30746cd57234a59e">utext_nativeLength()</a>. The resulting index value will be in between 0 and length, inclusive.<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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>delta</em>&nbsp;</td><td>the signed number of code points to move the iteration position. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the position could be moved the requested number of positions while staying within the range [0 - text length]. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001804">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b6a809d8168c1ccf30746cd57234a59e"></a><!-- doxytag: member="utext.h::utext_nativeLength" ref="b6a809d8168c1ccf30746cd57234a59e" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a> utext_nativeLength           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the length of the text. 
<p>
Depending on the characteristics of the underlying text representation, this may be expensive. <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="utext_8h.html#18dd4010f0d9fbe9c920f3ce954990ed">utext_isLengthExpensive()</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the length of the text, expressed in native units.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001794">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d4c8e3ba851a3482b2c77cc58cff9ad0"></a><!-- doxytag: member="utext.h::utext_next32" ref="d4c8e3ba851a3482b2c77cc58cff9ad0" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_next32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the code point at the current iteration position of the <a class="el" href="structUText.html">UText</a>, and advance the position to the first index following the character. 
<p>
If the position is at the end of the text (the index following the last character, which is also the length of the text), return U_SENTINEL (-1) and do not advance the index.<p>
This is a post-increment operation.<p>
An inline macro version of this function, <a class="el" href="utext_8h.html#a4b973aeeb5f10f8aec454545f85b6a2">UTEXT_NEXT32()</a>, is available for performance critical 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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the Unicode code point at the iteration position. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="utext_8h.html#a4b973aeeb5f10f8aec454545f85b6a2">UTEXT_NEXT32</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001798">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="819b23625de643f71280c076feac31a7"></a><!-- doxytag: member="utext.h::utext_next32From" ref="819b23625de643f71280c076feac31a7" args="(UText *ut, int64_t nativeIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_next32From           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeIndex</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 iteration index and return the code point at that index. 
<p>
Leave the iteration index at the start of the following code point.<p>
This function is the most efficient and convenient way to begin a forward iteration. The results are identical to the those from the sequence <div class="fragment"><pre class="fragment">    utext_setIndex();
    <a class="code" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32</a>();
</pre></div><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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>Iteration index, in the native units of the text provider. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Code point which starts at or before index, or U_SENTINEL (-1) if it is out of bounds. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001800">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="df311525bdd2a7f155bbe5cbb4c4de15"></a><!-- doxytag: member="utext.h::utext_openUChars" ref="df311525bdd2a7f155bbe5cbb4c4de15" args="(UText *ut, const UChar *s, int64_t length, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUText.html">UText</a>* utext_openUChars           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</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#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open a read-only <a class="el" href="structUText.html">UText</a> for UChar * string. 
<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>ut</em>&nbsp;</td><td>Pointer to a <a class="el" href="structUText.html">UText</a> struct. If NULL, a new <a class="el" href="structUText.html">UText</a> will be created. If non-NULL, must refer to an initialized <a class="el" href="structUText.html">UText</a> struct, which will then be reset to reference the specified UChar string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>A UChar (UTF-16) string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The number of UChars in the input string, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Errors are returned here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the <a class="el" href="structUText.html">UText</a>. If a pre-allocated <a class="el" href="structUText.html">UText</a> was provided, it will always be used and returned. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001791">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="32e9e14644d140c3501a7a09e7ad5864"></a><!-- doxytag: member="utext.h::utext_openUTF8" ref="32e9e14644d140c3501a7a09e7ad5864" args="(UText *ut, const char *s, int64_t length, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUText.html">UText</a>* utext_openUTF8           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</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#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open a read-only <a class="el" href="structUText.html">UText</a> implementation for UTF-8 strings. 
<p>
 
 Any invalid UTF-8 in the input will be handled in this way:
 a sequence of bytes that has the form of a truncated, but otherwise valid,
 UTF-8 sequence will be replaced by a single unicode replacement character, \uFFFD. 
 Any other illegal bytes will each be replaced by a \uFFFD.
 <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>ut</em>&nbsp;</td><td>Pointer to a <a class="el" href="structUText.html">UText</a> struct. If NULL, a new <a class="el" href="structUText.html">UText</a> will be created. If non-NULL, must refer to an initialized <a class="el" href="structUText.html">UText</a> struct, which will then be reset to reference the specified UTF-8 string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>A UTF-8 string. Must not be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The length of the UTF-8 string in bytes, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Errors are returned here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the <a class="el" href="structUText.html">UText</a>. If a pre-allocated <a class="el" href="structUText.html">UText</a> was provided, it will always be used and returned. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001790">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f762d727316244730b78667d12e26dd6"></a><!-- doxytag: member="utext.h::utext_previous32" ref="f762d727316244730b78667d12e26dd6" args="(UText *ut)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_previous32           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Move the iterator position to the character (code point) whose index precedes the current position, and return that character. 
<p>
This is a pre-decrement operation.<p>
If the initial position is at the start of the text (index of 0) return U_SENTINEL (-1), and leave the position unchanged.<p>
An inline macro version of this function, <a class="el" href="utext_8h.html#8aa3d9bae7b252622fe8e70e87758205">UTEXT_PREVIOUS32()</a>, is available for performance critical 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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the previous UChar32 code point, or U_SENTINEL (-1) if the iteration has reached the start of the text. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="utext_8h.html#8aa3d9bae7b252622fe8e70e87758205">UTEXT_PREVIOUS32</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001799">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="7d12867d3baae5beeb34351e172b5cd8"></a><!-- doxytag: member="utext.h::utext_previous32From" ref="7d12867d3baae5beeb34351e172b5cd8" args="(UText *ut, int64_t nativeIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utext_previous32From           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeIndex</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 iteration index, and return the code point preceding the one specified by the initial index. 
<p>
Leave the iteration position at the start of the returned code point.<p>
This function is the most efficient and convenient way to begin a backwards iteration.<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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>Iteration index in the native units of the text provider. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Code point preceding the one at the initial index, or U_SENTINEL (-1) if it is out of bounds.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001801">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a781cea4987dda8a7c5f0351e311bf07"></a><!-- doxytag: member="utext.h::utext_replace" ref="a781cea4987dda8a7c5f0351e311bf07" args="(UText *ut, int64_t nativeStart, int64_t nativeLimit, const UChar *replacementText, int32_t replacementLength, UErrorCode *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> utext_replace           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>replacementText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>replacementLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Replace a range of the original text with a replacement text. 
<p>
Leaves the current iteration position at the position following the newly inserted replacement text.<p>
This function is only available on <a class="el" href="structUText.html">UText</a> types that support writing, that is, ones where <a class="el" href="utext_8h.html#f67295033b5dc1b2951b8b05e5ce9222">utext_isWritable()</a> returns TRUE.<p>
When using this function, there should be only a single <a class="el" href="structUText.html">UText</a> opened onto the underlying native text string. Behavior after a replace operation on a <a class="el" href="structUText.html">UText</a> is undefined for any other additional UTexts that refer to the modified string.<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>ut</em>&nbsp;</td><td>the <a class="el" href="structUText.html">UText</a> representing the text to be operated on. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeStart</em>&nbsp;</td><td>the native index of the start of the region to be replaced </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeLimit</em>&nbsp;</td><td>the native index of the character following the region to be replaced. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replacementText</em>&nbsp;</td><td>pointer to the replacement text </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replacementLength</em>&nbsp;</td><td>length of the replacement text, or -1 if the text is NUL terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>receives any error status. Possible errors include U_NO_WRITE_PERMISSION</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The signed number of (native) storage units by which the length of the text expanded or contracted.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001812">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="530b4bb7f0e577008e4930f2b39ecd8a"></a><!-- doxytag: member="utext.h::utext_setNativeIndex" ref="530b4bb7f0e577008e4930f2b39ecd8a" args="(UText *ut, int64_t nativeIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void utext_setNativeIndex           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#dec1df1b8b51cb32b77e5b86fff46471">int64_t</a>&nbsp;</td>
          <td class="paramname"> <em>nativeIndex</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 current iteration position to the nearest code point boundary at or preceding the specified index. 
<p>
The index is in the native units of the original input text. If the index is out of range, it will be pinned to be within the range of the input text. <p>
It will usually be more efficient to begin an iteration using the functions <a class="el" href="utext_8h.html#819b23625de643f71280c076feac31a7">utext_next32From()</a> or <a class="el" href="utext_8h.html#7d12867d3baae5beeb34351e172b5cd8">utext_previous32From()</a> rather than setIndex(). <p>
Moving the index position to an adjacent character is best done with <a class="el" href="utext_8h.html#d4c8e3ba851a3482b2c77cc58cff9ad0">utext_next32()</a>, <a class="el" href="utext_8h.html#f762d727316244730b78667d12e26dd6">utext_previous32()</a> or <a class="el" href="utext_8h.html#f91afb68d5059ec704d8d6969288c00d">utext_moveIndex32()</a>. Attempting to do direct arithmetic on the index position is complicated by the fact that the size (in native units) of a character depends on the underlying representation of the character (UTF-8, UTF-16, UTF-32, arbitrary codepage), and is not easily knowable.<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>ut</em>&nbsp;</td><td>the text to be accessed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nativeIndex</em>&nbsp;</td><td>the native unit index of the new iteration position. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001803">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="024e9470afd51e1ae247dcbfbbbe8a67"></a><!-- doxytag: member="utext.h::utext_setup" ref="024e9470afd51e1ae247dcbfbbbe8a67" args="(UText *ut, int32_t extraSpace, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUText.html">UText</a>* utext_setup           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUText.html">UText</a> *&nbsp;</td>
          <td class="paramname"> <em>ut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>extraSpace</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Common function for use by Text Provider implementations to allocate and/or initialize a new <a class="el" href="structUText.html">UText</a> struct. 
<p>
To be called in the implementation of utext_open() functions. If the supplied <a class="el" href="structUText.html">UText</a> parameter is null, a new <a class="el" href="structUText.html">UText</a> struct will be allocated on the heap. If the supplied <a class="el" href="structUText.html">UText</a> is already open, the provider's close function will be called so that the struct can be reused by the open that is in progress.<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>ut</em>&nbsp;</td><td>pointer to a <a class="el" href="structUText.html">UText</a> struct to be re-used, or null if a new <a class="el" href="structUText.html">UText</a> should be allocated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>extraSpace</em>&nbsp;</td><td>The amount of additional space to be allocated as part of this <a class="el" href="structUText.html">UText</a>, for use by types of providers that require additional storage. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Errors are returned here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to the <a class="el" href="structUText.html">UText</a>, allocated if necessary, with extra space set up if requested. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001827">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:32 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>