Sophie

Sophie

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

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

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

<p><a href="utf8_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#ae534bfef078b4f5d09e8da543a779db7">U8_COUNT_TRAIL_BYTES</a>(leadByte)&nbsp;&nbsp;&nbsp;(<a class="el" href="utf8_8h.html#a4e3ae25d5856272ab60ab87c28572a99">utf8_countTrailBytes</a>[(uint8_t)leadByte])</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Count the trail bytes for a UTF-8 lead byte.  <a href="#ae534bfef078b4f5d09e8da543a779db7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#ae8ed1045986b8bf27814e9bc78388961">U8_MASK_LEAD_BYTE</a>(leadByte, countTrailBytes)&nbsp;&nbsp;&nbsp;((leadByte)&amp;=(1&lt;&lt;(6-(countTrailBytes)))-1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value.  <a href="#ae8ed1045986b8bf27814e9bc78388961"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a8f3a9427d880458a9fa6b169a3cc1b3c">U8_IS_SINGLE</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0x80)==0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)?  <a href="#a8f3a9427d880458a9fa6b169a3cc1b3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#adb9837ea38dd811524a5b761ddc2a2ca">U8_IS_LEAD</a>(c)&nbsp;&nbsp;&nbsp;((uint8_t)((c)-0xc0)&lt;0x3e)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code unit (byte) a UTF-8 lead byte?  <a href="#adb9837ea38dd811524a5b761ddc2a2ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e">U8_IS_TRAIL</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0xc0)==0x80)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code unit (byte) a UTF-8 trail byte?  <a href="#afed9fc9bf480bf15a2e6051774f2d80e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#af1730b8bbb3053465ee58702821846f1">U8_LENGTH</a>(c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">How many code units (bytes) are used for the UTF-8 encoding of this Unicode code point?  <a href="#af1730b8bbb3053465ee58702821846f1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#aa2298b48749d9f45772c8f5a6885464a">U8_MAX_LENGTH</a>&nbsp;&nbsp;&nbsp;4</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The maximum number of UTF-8 code units (bytes) per Unicode code point (U+0000..U+10ffff).  <a href="#aa2298b48749d9f45772c8f5a6885464a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a125e5e7a4ef2f3f57b078f706b2b67f8">U8_GET_UNSAFE</a>(s, i, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a code point from a string at a random-access offset, without changing the offset.  <a href="#a125e5e7a4ef2f3f57b078f706b2b67f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a10a57a084d75604c4a81fb5eec46ae6a">U8_GET</a>(s, start, i, length, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a code point from a string at a random-access offset, without changing the offset.  <a href="#a10a57a084d75604c4a81fb5eec46ae6a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a28ecdb4233301285fc4ce7f9ea1ed644">U8_NEXT_UNSAFE</a>(s, i, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a code point from a string at a code point boundary offset, and advance the offset to the next code point boundary.  <a href="#a28ecdb4233301285fc4ce7f9ea1ed644"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a57f3e5429ae4edb27a42367c627aa482">U8_NEXT</a>(s, i, length, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a code point from a string at a code point boundary offset, and advance the offset to the next code point boundary.  <a href="#a57f3e5429ae4edb27a42367c627aa482"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a154f04764da5af41729c4df6bf9e09f3">U8_APPEND_UNSAFE</a>(s, i, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append a code point to a string, overwriting 1 to 4 bytes.  <a href="#a154f04764da5af41729c4df6bf9e09f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a8a013997e3d13c501ce73bc45e662881">U8_APPEND</a>(s, i, capacity, c, isError)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append a code point to a string, overwriting 1 to 4 bytes.  <a href="#a8a013997e3d13c501ce73bc45e662881"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a64a8113aea2125f806cbf5d77294b3cd">U8_FWD_1_UNSAFE</a>(s, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the string offset from one code point boundary to the next.  <a href="#a64a8113aea2125f806cbf5d77294b3cd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a6d4c94e845b059fddba0c51e9bad87fd">U8_FWD_1</a>(s, i, length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the string offset from one code point boundary to the next.  <a href="#a6d4c94e845b059fddba0c51e9bad87fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a8e8b4218834110431798cc84a0a664ae">U8_FWD_N_UNSAFE</a>(s, i, n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the string offset from one code point boundary to the n-th next one, i.e., move forward by n code points.  <a href="#a8e8b4218834110431798cc84a0a664ae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a9a311dc48b8aa1050345b886adabf213">U8_FWD_N</a>(s, i, length, n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Advance the string offset from one code point boundary to the n-th next one, i.e., move forward by n code points.  <a href="#a9a311dc48b8aa1050345b886adabf213"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#ac46a385dbf64c97337522e1d1875a57e">U8_SET_CP_START_UNSAFE</a>(s, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjust a random-access offset to a code point boundary at the start of a code point.  <a href="#ac46a385dbf64c97337522e1d1875a57e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#aa6d33627a8a5420a8f61e50da2aeca2a">U8_SET_CP_START</a>(s, start, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjust a random-access offset to a code point boundary at the start of a code point.  <a href="#aa6d33627a8a5420a8f61e50da2aeca2a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a5f78eb19a6b25f61dccbae45d6ecf955">U8_PREV_UNSAFE</a>(s, i, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the previous one and get the code point between them.  <a href="#a5f78eb19a6b25f61dccbae45d6ecf955"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a17287c1f01ce84fdf8852a756643b076">U8_PREV</a>(s, start, i, c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the previous one and get the code point between them.  <a href="#a17287c1f01ce84fdf8852a756643b076"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a3969beb6252f8605ab678990c8af2f48">U8_BACK_1_UNSAFE</a>(s, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the previous one.  <a href="#a3969beb6252f8605ab678990c8af2f48"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#adac4ee359e6233cb2990b1047fd5be3c">U8_BACK_1</a>(s, start, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the previous one.  <a href="#adac4ee359e6233cb2990b1047fd5be3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#aa36f62ea4ac87362e376e4cbea10098d">U8_BACK_N_UNSAFE</a>(s, i, n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the n-th one before it, i.e., move backward by n code points.  <a href="#aa36f62ea4ac87362e376e4cbea10098d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#ab0ce585952c8ba4b103fb6b7aea801ba">U8_BACK_N</a>(s, start, i, n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the string offset from one code point boundary to the n-th one before it, i.e., move backward by n code points.  <a href="#ab0ce585952c8ba4b103fb6b7aea801ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a910ba47de6d82fafc25b5e12f3a68588">U8_SET_CP_LIMIT_UNSAFE</a>(s, i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjust a random-access offset to a code point boundary after a code point.  <a href="#a910ba47de6d82fafc25b5e12f3a68588"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a40fe523809a3a4e647e47513336b81d9">U8_SET_CP_LIMIT</a>(s, start, i, length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjust a random-access offset to a code point boundary after a code point.  <a href="#a40fe523809a3a4e647e47513336b81d9"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a6eaf56eb54abb71eafcc0c347daa821f">utf8_nextCharSafeBody</a> (const uint8_t *s, int32_t *pi, int32_t length, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> strict)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function for handling "next code point" with error-checking.  <a href="#a6eaf56eb54abb71eafcc0c347daa821f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a6cf17491f1c237bbe5b002056b830fd3">utf8_appendCharSafeBody</a> (uint8_t *s, int32_t i, int32_t length, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *pIsError)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function for handling "append code point" with error-checking.  <a href="#a6cf17491f1c237bbe5b002056b830fd3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a2bbae41d2d845750088a17dc55f59096">utf8_prevCharSafeBody</a> (const uint8_t *s, int32_t start, int32_t *pi, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> strict)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function for handling "previous code point" with error-checking.  <a href="#a2bbae41d2d845750088a17dc55f59096"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a4017310e2ecadac7dea5a432a33ccf30">utf8_back1SafeBody</a> (const uint8_t *s, int32_t start, int32_t i)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function for handling "skip backward one code point" with error-checking.  <a href="#a4017310e2ecadac7dea5a432a33ccf30"></a><br/></td></tr>
<tr><td colspan="2"><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">U_CFUNC U_IMPORT const uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf8_8h.html#a4e3ae25d5856272ab60ab87c28572a99">utf8_countTrailBytes</a> [256]</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal array with numbers of trail bytes for any given byte used in lead byte position.  <a href="#a4e3ae25d5856272ab60ab87c28572a99"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: 8-bit Unicode handling macros. </p>
<p>This file defines macros to deal with 8-bit Unicode (UTF-8) code units (bytes) and strings. <a class="el" href="utf8_8h.html" title="C API: 8-bit Unicode handling macros.">utf8.h</a> is included by <a class="el" href="utf_8h.html" title="C API: Code point macros.">utf.h</a> after <a class="el" href="umachine_8h.html" title="Basic types and constants for UTF.">unicode/umachine.h</a> and some common definitions.</p>
<p>For more information see <a class="el" href="utf_8h.html" title="C API: Code point macros.">utf.h</a> and the ICU User Guide Strings chapter (<a href="http://icu-project.org/userguide/strings.html">http://icu-project.org/userguide/strings.html</a>).</p>
<p><em>Usage:</em> ICU coding guidelines for if() statements should be followed when using these macros. Compound statements (curly braces {}) must be used for if-else-while... bodies and all macro statements should be terminated with semicolon. </p>

<p>Definition in file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a8a013997e3d13c501ce73bc45e662881"></a><!-- doxytag: member="utf8.h::U8_APPEND" ref="a8a013997e3d13c501ce73bc45e662881" args="(s, i, capacity, c, isError)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_APPEND</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">capacity, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">isError&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0x7f) { \
        (s)[(i)++]=(uint8_t)(c); \
    } <span class="keywordflow">else</span> <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0x7ff &amp;&amp; (i)+1&lt;(capacity)) { \
        (s)[(i)++]=(uint8_t)(((c)&gt;&gt;6)|0xc0); \
        (s)[(i)++]=(uint8_t)(((c)&amp;0x3f)|0x80); \
    } <span class="keywordflow">else</span> <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0xd7ff &amp;&amp; (i)+2&lt;(capacity)) { \
        (s)[(i)++]=(uint8_t)(((c)&gt;&gt;12)|0xe0); \
        (s)[(i)++]=(uint8_t)((((c)&gt;&gt;6)&amp;0x3f)|0x80); \
        (s)[(i)++]=(uint8_t)(((c)&amp;0x3f)|0x80); \
    } <span class="keywordflow">else</span> { \
        (i)=<a class="code" href="utf8_8h.html#a6cf17491f1c237bbe5b002056b830fd3" title="Function for handling &amp;quot;append code point&amp;quot; with error-checking.">utf8_appendCharSafeBody</a>(s, (int32_t)(i), (int32_t)(capacity), c, &amp;(isError)); \
    } \
}
</pre></div>
<p>Append a code point to a string, overwriting 1 to 4 bytes. </p>
<p>The offset points to the current end of the string contents and is advanced (post-increment). "Safe" macro, checks for a valid code point. If a non-ASCII code point is written, checks for sufficient space in the string. If the code point is not valid or trail bytes do not fit, then isError is set to TRUE.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be i&lt;capacity </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>capacity</em>&nbsp;</td><td>size of the string buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>code point to append </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isError</em>&nbsp;</td><td>output UBool set to TRUE if an error occurs, otherwise not modified </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a154f04764da5af41729c4df6bf9e09f3" title="Append a code point to a string, overwriting 1 to 4 bytes.">U8_APPEND_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002064">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00361">361</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a154f04764da5af41729c4df6bf9e09f3"></a><!-- doxytag: member="utf8.h::U8_APPEND_UNSAFE" ref="a154f04764da5af41729c4df6bf9e09f3" args="(s, i, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_APPEND_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0x7f) { \
        (s)[(i)++]=(uint8_t)(c); \
    } <span class="keywordflow">else</span> { \
        <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0x7ff) { \
            (s)[(i)++]=(uint8_t)(((c)&gt;&gt;6)|0xc0); \
        } <span class="keywordflow">else</span> { \
            <span class="keywordflow">if</span>((uint32_t)(c)&lt;=0xffff) { \
                (s)[(i)++]=(uint8_t)(((c)&gt;&gt;12)|0xe0); \
            } <span class="keywordflow">else</span> { \
                (s)[(i)++]=(uint8_t)(((c)&gt;&gt;18)|0xf0); \
                (s)[(i)++]=(uint8_t)((((c)&gt;&gt;12)&amp;0x3f)|0x80); \
            } \
            (s)[(i)++]=(uint8_t)((((c)&gt;&gt;6)&amp;0x3f)|0x80); \
        } \
        (s)[(i)++]=(uint8_t)(((c)&amp;0x3f)|0x80); \
    } \
}
</pre></div>
<p>Append a code point to a string, overwriting 1 to 4 bytes. </p>
<p>The offset points to the current end of the string contents and is advanced (post-increment). "Unsafe" macro, assumes a valid code point and sufficient space in the string. Otherwise, the result is undefined.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>code point to append </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a8a013997e3d13c501ce73bc45e662881" title="Append a code point to a string, overwriting 1 to 4 bytes.">U8_APPEND</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002063">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00325">325</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="adac4ee359e6233cb2990b1047fd5be3c"></a><!-- doxytag: member="utf8.h::U8_BACK_1" ref="adac4ee359e6233cb2990b1047fd5be3c" args="(s, start, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_BACK_1</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">if</span>(<a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>((s)[--(i)])) { \
        (i)=<a class="code" href="utf8_8h.html#a4017310e2ecadac7dea5a432a33ccf30" title="Function for handling &amp;quot;skip backward one code point&amp;quot; with error-checking...">utf8_back1SafeBody</a>(s, start, (int32_t)(i)); \
    } \
}
</pre></div>
<p>Move the string offset from one code point boundary to the previous one. </p>
<p>(Pre-decrementing backward iteration.) The input offset may be the same as the string length. "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>starting string offset (usually 0) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;i </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a3969beb6252f8605ab678990c8af2f48" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002074">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00594">594</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3969beb6252f8605ab678990c8af2f48"></a><!-- doxytag: member="utf8.h::U8_BACK_1_UNSAFE" ref="a3969beb6252f8605ab678990c8af2f48" args="(s, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_BACK_1_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">while</span>(<a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>((s)[--(i)])) {} \
}
</pre></div>
<p>Move the string offset from one code point boundary to the previous one. </p>
<p>(Pre-decrementing backward iteration.) The input offset may be the same as the string length. "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#adac4ee359e6233cb2990b1047fd5be3c" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002073">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00578">578</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab0ce585952c8ba4b103fb6b7aea801ba"></a><!-- doxytag: member="utf8.h::U8_BACK_N" ref="ab0ce585952c8ba4b103fb6b7aea801ba" args="(s, start, i, n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_BACK_N</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">n&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t __N=(n); \
    <span class="keywordflow">while</span>(__N&gt;0 &amp;&amp; (i)&gt;(start)) { \
        <a class="code" href="utf8_8h.html#adac4ee359e6233cb2990b1047fd5be3c" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1</a>(s, start, i); \
        --__N; \
    } \
}
</pre></div>
<p>Move the string offset from one code point boundary to the n-th one before it, i.e., move backward by n code points. </p>
<p>(Pre-decrementing backward iteration.) The input offset may be the same as the string length. "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>index of the start of the string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;i </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>number of code points to skip </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#aa36f62ea4ac87362e376e4cbea10098d" title="Move the string offset from one code point boundary to the n-th one before it, i...">U8_BACK_N_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002076">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00635">635</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa36f62ea4ac87362e376e4cbea10098d"></a><!-- doxytag: member="utf8.h::U8_BACK_N_UNSAFE" ref="aa36f62ea4ac87362e376e4cbea10098d" args="(s, i, n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_BACK_N_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">n&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t __N=(n); \
    <span class="keywordflow">while</span>(__N&gt;0) { \
        <a class="code" href="utf8_8h.html#a3969beb6252f8605ab678990c8af2f48" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1_UNSAFE</a>(s, i); \
        --__N; \
    } \
}
</pre></div>
<p>Move the string offset from one code point boundary to the n-th one before it, i.e., move backward by n code points. </p>
<p>(Pre-decrementing backward iteration.) The input offset may be the same as the string length. "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>number of code points to skip </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#ab0ce585952c8ba4b103fb6b7aea801ba" title="Move the string offset from one code point boundary to the n-th one before it, i...">U8_BACK_N</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002075">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00613">613</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae534bfef078b4f5d09e8da543a779db7"></a><!-- doxytag: member="utf8.h::U8_COUNT_TRAIL_BYTES" ref="ae534bfef078b4f5d09e8da543a779db7" args="(leadByte)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_COUNT_TRAIL_BYTES</td>
          <td>(</td>
          <td class="paramtype">leadByte&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(<a class="el" href="utf8_8h.html#a4e3ae25d5856272ab60ab87c28572a99">utf8_countTrailBytes</a>[(uint8_t)leadByte])</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count the trail bytes for a UTF-8 lead byte. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is called by public macros in this file and thus must remain stable. </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000125">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00071">71</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6d4c94e845b059fddba0c51e9bad87fd"></a><!-- doxytag: member="utf8.h::U8_FWD_1" ref="a6d4c94e845b059fddba0c51e9bad87fd" args="(s, i, length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_FWD_1</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">length&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    uint8_t __b=(uint8_t)(s)[(i)++]; \
    <span class="keywordflow">if</span>(<a class="code" href="utf8_8h.html#adb9837ea38dd811524a5b761ddc2a2ca" title="Is this code unit (byte) a UTF-8 lead byte?">U8_IS_LEAD</a>(__b)) { \
        uint8_t __count=<a class="code" href="utf8_8h.html#ae534bfef078b4f5d09e8da543a779db7" title="Count the trail bytes for a UTF-8 lead byte.">U8_COUNT_TRAIL_BYTES</a>(__b); \
        <span class="keywordflow">if</span>((i)+__count&gt;(length)) { \
            __count=(uint8_t)((length)-(i)); \
        } \
        <span class="keywordflow">while</span>(__count&gt;0 &amp;&amp; <a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>((s)[i])) { \
            ++(i); \
            --__count; \
        } \
    } \
}
</pre></div>
<p>Advance the string offset from one code point boundary to the next. </p>
<p>(Post-incrementing iteration.) "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be i&lt;length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>string length </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a64a8113aea2125f806cbf5d77294b3cd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002066">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00401">401</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a64a8113aea2125f806cbf5d77294b3cd"></a><!-- doxytag: member="utf8.h::U8_FWD_1_UNSAFE" ref="a64a8113aea2125f806cbf5d77294b3cd" args="(s, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_FWD_1_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    (i)+=1+<a class="code" href="utf8_8h.html#ae534bfef078b4f5d09e8da543a779db7" title="Count the trail bytes for a UTF-8 lead byte.">U8_COUNT_TRAIL_BYTES</a>((s)[i]); \
}
</pre></div>
<p>Advance the string offset from one code point boundary to the next. </p>
<p>(Post-incrementing iteration.) "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a6d4c94e845b059fddba0c51e9bad87fd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002065">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00386">386</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9a311dc48b8aa1050345b886adabf213"></a><!-- doxytag: member="utf8.h::U8_FWD_N" ref="a9a311dc48b8aa1050345b886adabf213" args="(s, i, length, n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_FWD_N</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">length, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">n&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t __N=(n); \
    <span class="keywordflow">while</span>(__N&gt;0 &amp;&amp; (i)&lt;(length)) { \
        <a class="code" href="utf8_8h.html#a6d4c94e845b059fddba0c51e9bad87fd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1</a>(s, i, length); \
        --__N; \
    } \
}
</pre></div>
<p>Advance the string offset from one code point boundary to the n-th next one, i.e., move forward by n code points. </p>
<p>(Post-incrementing iteration.) "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be i&lt;length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>string length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>number of code points to skip </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a8e8b4218834110431798cc84a0a664ae" title="Advance the string offset from one code point boundary to the n-th next one, i.e...">U8_FWD_N_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002068">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00448">448</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8e8b4218834110431798cc84a0a664ae"></a><!-- doxytag: member="utf8.h::U8_FWD_N_UNSAFE" ref="a8e8b4218834110431798cc84a0a664ae" args="(s, i, n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_FWD_N_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">n&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t __N=(n); \
    <span class="keywordflow">while</span>(__N&gt;0) { \
        <a class="code" href="utf8_8h.html#a64a8113aea2125f806cbf5d77294b3cd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1_UNSAFE</a>(s, i); \
        --__N; \
    } \
}
</pre></div>
<p>Advance the string offset from one code point boundary to the n-th next one, i.e., move forward by n code points. </p>
<p>(Post-incrementing iteration.) "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>number of code points to skip </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a9a311dc48b8aa1050345b886adabf213" title="Advance the string offset from one code point boundary to the n-th next one, i.e...">U8_FWD_N</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002067">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00427">427</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a10a57a084d75604c4a81fb5eec46ae6a"></a><!-- doxytag: member="utf8.h::U8_GET" ref="a10a57a084d75604c4a81fb5eec46ae6a" args="(s, start, i, length, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_GET</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">length, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t _u8_get_index=(int32_t)(i); \
    <a class="code" href="utf8_8h.html#aa6d33627a8a5420a8f61e50da2aeca2a" title="Adjust a random-access offset to a code point boundary at the start of a code point...">U8_SET_CP_START</a>(s, start, _u8_get_index); \
    <a class="code" href="utf8_8h.html#a57f3e5429ae4edb27a42367c627aa482" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U8_NEXT</a>(s, _u8_get_index, length, c); \
}
</pre></div>
<p>Get a code point from a string at a random-access offset, without changing the offset. </p>
<p>The offset may point to either the lead byte or one of the trail bytes for a code point, in which case the macro will read all of the bytes for the code point. If the offset points to an illegal UTF-8 byte sequence, then c is set to a negative value. Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>starting string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;=i&lt;length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>string length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable, set to &lt;0 in case of an error </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a125e5e7a4ef2f3f57b078f706b2b67f8" title="Get a code point from a string at a random-access offset, without changing the offset...">U8_GET_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002060">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00221">221</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a125e5e7a4ef2f3f57b078f706b2b67f8"></a><!-- doxytag: member="utf8.h::U8_GET_UNSAFE" ref="a125e5e7a4ef2f3f57b078f706b2b67f8" args="(s, i, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_GET_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    int32_t _u8_get_unsafe_index=(int32_t)(i); \
    <a class="code" href="utf8_8h.html#ac46a385dbf64c97337522e1d1875a57e" title="Adjust a random-access offset to a code point boundary at the start of a code point...">U8_SET_CP_START_UNSAFE</a>(s, _u8_get_unsafe_index); \
    <a class="code" href="utf8_8h.html#a28ecdb4233301285fc4ce7f9ea1ed644" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U8_NEXT_UNSAFE</a>(s, _u8_get_unsafe_index, c); \
}
</pre></div>
<p>Get a code point from a string at a random-access offset, without changing the offset. </p>
<p>The offset may point to either the lead byte or one of the trail bytes for a code point, in which case the macro will read all of the bytes for the code point. The result is undefined if the offset points to an illegal UTF-8 byte sequence. Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a10a57a084d75604c4a81fb5eec46ae6a" title="Get a code point from a string at a random-access offset, without changing the offset...">U8_GET</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002059">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00197">197</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="adb9837ea38dd811524a5b761ddc2a2ca"></a><!-- doxytag: member="utf8.h::U8_IS_LEAD" ref="adb9837ea38dd811524a5b761ddc2a2ca" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_IS_LEAD</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;((uint8_t)((c)-0xc0)&lt;0x3e)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code unit (byte) a UTF-8 lead byte? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>8-bit code unit (byte) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002055">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00146">146</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8f3a9427d880458a9fa6b169a3cc1b3c"></a><!-- doxytag: member="utf8.h::U8_IS_SINGLE" ref="a8f3a9427d880458a9fa6b169a3cc1b3c" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_IS_SINGLE</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0x80)==0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>8-bit code unit (byte) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002054">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00138">138</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="afed9fc9bf480bf15a2e6051774f2d80e"></a><!-- doxytag: member="utf8.h::U8_IS_TRAIL" ref="afed9fc9bf480bf15a2e6051774f2d80e" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_IS_TRAIL</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0xc0)==0x80)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code unit (byte) a UTF-8 trail byte? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>8-bit code unit (byte) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002056">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00154">154</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="af1730b8bbb3053465ee58702821846f1"></a><!-- doxytag: member="utf8.h::U8_LENGTH" ref="af1730b8bbb3053465ee58702821846f1" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_LENGTH</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">((uint32_t)(c)&lt;=0x7f ? 1 : \
        ((uint32_t)(c)&lt;=0x7ff ? 2 : \
            ((uint32_t)(c)&lt;=0xd7ff ? 3 : \
                ((uint32_t)(c)&lt;=0xdfff || (uint32_t)(c)&gt;0x10ffff ? 0 : \
                    ((uint32_t)(c)&lt;=0xffff ? 3 : 4)\
                ) \
            ) \
        ) \
    )
</pre></div>
<p>How many code units (bytes) are used for the UTF-8 encoding of this Unicode code point? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1..4, or 0 if c is a surrogate or not a Unicode code point </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002057">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
<a class="anchor" id="ae8ed1045986b8bf27814e9bc78388961"></a><!-- doxytag: member="utf8.h::U8_MASK_LEAD_BYTE" ref="ae8ed1045986b8bf27814e9bc78388961" args="(leadByte, countTrailBytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_MASK_LEAD_BYTE</td>
          <td>(</td>
          <td class="paramtype">leadByte, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">countTrailBytes&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;((leadByte)&amp;=(1&lt;&lt;(6-(countTrailBytes)))-1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is called by public macros in this file and thus must remain stable. </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000126">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00080">80</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa2298b48749d9f45772c8f5a6885464a"></a><!-- doxytag: member="utf8.h::U8_MAX_LENGTH" ref="aa2298b48749d9f45772c8f5a6885464a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_MAX_LENGTH&nbsp;&nbsp;&nbsp;4</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The maximum number of UTF-8 code units (bytes) per Unicode code point (U+0000..U+10ffff). </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>4 </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002058">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00179">179</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a57f3e5429ae4edb27a42367c627aa482"></a><!-- doxytag: member="utf8.h::U8_NEXT" ref="a57f3e5429ae4edb27a42367c627aa482" args="(s, i, length, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_NEXT</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">length, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    (c)=(uint8_t)(s)[(i)++]; \
    <span class="keywordflow">if</span>((c)&gt;=0x80) { \
        uint8_t __t1, __t2; \
        <span class="keywordflow">if</span>( <span class="comment">/* handle U+1000..U+CFFF inline */</span> \
            (0xe0&lt;(c) &amp;&amp; (c)&lt;=0xec) &amp;&amp; \
            (((i)+1)&lt;(length)) &amp;&amp; \
            (__t1=(uint8_t)((s)[i]-0x80))&lt;=0x3f &amp;&amp; \
            (__t2=(uint8_t)((s)[(i)+1]-0x80))&lt;= 0x3f \
        ) { \
            <span class="comment">/* no need for (c&amp;0xf) because the upper bits are truncated after &lt;&lt;12 in the cast to (UChar) */</span> \
            (c)=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>)(((c)&lt;&lt;12)|(__t1&lt;&lt;6)|__t2); \
            (i)+=2; \
        } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <span class="comment">/* handle U+0080..U+07FF inline */</span> \
            ((c)&lt;0xe0 &amp;&amp; (c)&gt;=0xc2) &amp;&amp; \
            ((i)&lt;(length)) &amp;&amp; \
            (__t1=(uint8_t)((s)[i]-0x80))&lt;=0x3f \
        ) { \
            (c)=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>)((((c)&amp;0x1f)&lt;&lt;6)|__t1); \
            ++(i); \
        } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="utf8_8h.html#adb9837ea38dd811524a5b761ddc2a2ca" title="Is this code unit (byte) a UTF-8 lead byte?">U8_IS_LEAD</a>(c)) { \
            <span class="comment">/* function call for &quot;complicated&quot; and error cases */</span> \
            (c)=<a class="code" href="utf8_8h.html#a6eaf56eb54abb71eafcc0c347daa821f" title="Function for handling &amp;quot;next code point&amp;quot; with error-checking.">utf8_nextCharSafeBody</a>((<span class="keyword">const</span> uint8_t *)s, &amp;(i), (int32_t)(length), c, -1); \
        } <span class="keywordflow">else</span> { \
            (c)=<a class="code" href="utf_8h.html#a807436737b76a72b76ddf0b900304b4a" title="This value is intended for sentinel values for APIs that (take or) return single...">U_SENTINEL</a>; \
        } \
    } \
}
</pre></div>
<p>Get a code point from a string at a code point boundary offset, and advance the offset to the next code point boundary. </p>
<p>(Post-incrementing forward iteration.) "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<p>The offset may point to the lead byte of a multi-byte sequence, in which case the macro will read the whole sequence. If the offset points to a trail byte or an illegal UTF-8 sequence, then c is set to a negative value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be i&lt;length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>string length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable, set to &lt;0 in case of an error </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a28ecdb4233301285fc4ce7f9ea1ed644" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U8_NEXT_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002062">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00283">283</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a28ecdb4233301285fc4ce7f9ea1ed644"></a><!-- doxytag: member="utf8.h::U8_NEXT_UNSAFE" ref="a28ecdb4233301285fc4ce7f9ea1ed644" args="(s, i, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_NEXT_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    (c)=(uint8_t)(s)[(i)++]; \
    <span class="keywordflow">if</span>((uint8_t)((c)-0xc0)&lt;0x35) { \
        uint8_t __count=<a class="code" href="utf8_8h.html#ae534bfef078b4f5d09e8da543a779db7" title="Count the trail bytes for a UTF-8 lead byte.">U8_COUNT_TRAIL_BYTES</a>(c); \
        <a class="code" href="utf8_8h.html#ae8ed1045986b8bf27814e9bc78388961" title="Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point...">U8_MASK_LEAD_BYTE</a>(c, __count); \
        <span class="keywordflow">switch</span>(__count) { \
        <span class="comment">/* each following branch falls through to the next one */</span> \
        <span class="keywordflow">case</span> 3: \
            (c)=((c)&lt;&lt;6)|((s)[(i)++]&amp;0x3f); \
        <span class="keywordflow">case</span> 2: \
            (c)=((c)&lt;&lt;6)|((s)[(i)++]&amp;0x3f); \
        <span class="keywordflow">case</span> 1: \
            (c)=((c)&lt;&lt;6)|((s)[(i)++]&amp;0x3f); \
        <span class="comment">/* no other branches to optimize switch() */</span> \
            <span class="keywordflow">break</span>; \
        } \
    } \
}
</pre></div>
<p>Get a code point from a string at a code point boundary offset, and advance the offset to the next code point boundary. </p>
<p>(Post-incrementing forward iteration.) "Unsafe" macro, assumes well-formed UTF-8.</p>
<p>The offset may point to the lead byte of a multi-byte sequence, in which case the macro will read the whole sequence. The result is undefined if the offset points to a trail byte or an illegal UTF-8 sequence.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a57f3e5429ae4edb27a42367c627aa482" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U8_NEXT</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002061">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00246">246</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a17287c1f01ce84fdf8852a756643b076"></a><!-- doxytag: member="utf8.h::U8_PREV" ref="a17287c1f01ce84fdf8852a756643b076" args="(s, start, i, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_PREV</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    (c)=(uint8_t)(s)[--(i)]; \
    <span class="keywordflow">if</span>((c)&gt;=0x80) { \
        <span class="keywordflow">if</span>((c)&lt;=0xbf) { \
            (c)=<a class="code" href="utf8_8h.html#a2bbae41d2d845750088a17dc55f59096" title="Function for handling &amp;quot;previous code point&amp;quot; with error-checking.">utf8_prevCharSafeBody</a>((<span class="keyword">const</span> uint8_t *)s, start, &amp;(i), c, -1); \
        } <span class="keywordflow">else</span> { \
            (c)=<a class="code" href="utf_8h.html#a807436737b76a72b76ddf0b900304b4a" title="This value is intended for sentinel values for APIs that (take or) return single...">U_SENTINEL</a>; \
        } \
    } \
}
</pre></div>
<p>Move the string offset from one code point boundary to the previous one and get the code point between them. </p>
<p>(Pre-decrementing backward iteration.) "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<p>The input offset may be the same as the string length. If the offset is behind a multi-byte sequence, then the macro will read the whole sequence. If the offset is behind a lead byte, then that itself will be returned as the code point. If the offset is behind an illegal UTF-8 sequence, then c is set to a negative value.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>starting string offset (usually 0) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;i </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable, set to &lt;0 in case of an error </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a5f78eb19a6b25f61dccbae45d6ecf955" title="Move the string offset from one code point boundary to the previous one and get the...">U8_PREV_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002072">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00556">556</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5f78eb19a6b25f61dccbae45d6ecf955"></a><!-- doxytag: member="utf8.h::U8_PREV_UNSAFE" ref="a5f78eb19a6b25f61dccbae45d6ecf955" args="(s, i, c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_PREV_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    (c)=(uint8_t)(s)[--(i)]; \
    <span class="keywordflow">if</span>(<a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>(c)) { \
        uint8_t __b, __count=1, __shift=6; \
\
        <span class="comment">/* c is a trail byte */</span> \
        (c)&amp;=0x3f; \
        <span class="keywordflow">for</span>(;;) { \
            __b=(uint8_t)(s)[--(i)]; \
            <span class="keywordflow">if</span>(__b&gt;=0xc0) { \
                <a class="code" href="utf8_8h.html#ae8ed1045986b8bf27814e9bc78388961" title="Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point...">U8_MASK_LEAD_BYTE</a>(__b, __count); \
                (c)|=(<a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a>)__b&lt;&lt;__shift; \
                <span class="keywordflow">break</span>; \
            } <span class="keywordflow">else</span> { \
                (c)|=(<a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a>)(__b&amp;0x3f)&lt;&lt;__shift; \
                ++__count; \
                __shift+=6; \
            } \
        } \
    } \
}
</pre></div>
<p>Move the string offset from one code point boundary to the previous one and get the code point between them. </p>
<p>(Pre-decrementing backward iteration.) "Unsafe" macro, assumes well-formed UTF-8.</p>
<p>The input offset may be the same as the string length. If the offset is behind a multi-byte sequence, then the macro will read the whole sequence. If the offset is behind a lead byte, then that itself will be returned as the code point. The result is undefined if the offset is behind an illegal UTF-8 sequence.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>output UChar32 variable </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a17287c1f01ce84fdf8852a756643b076" title="Move the string offset from one code point boundary to the previous one and get the...">U8_PREV</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002071">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00514">514</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a40fe523809a3a4e647e47513336b81d9"></a><!-- doxytag: member="utf8.h::U8_SET_CP_LIMIT" ref="a40fe523809a3a4e647e47513336b81d9" args="(s, start, i, length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_SET_CP_LIMIT</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">length&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">if</span>((start)&lt;(i) &amp;&amp; (i)&lt;(length)) { \
        <a class="code" href="utf8_8h.html#adac4ee359e6233cb2990b1047fd5be3c" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1</a>(s, start, i); \
        <a class="code" href="utf8_8h.html#a6d4c94e845b059fddba0c51e9bad87fd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1</a>(s, i, length); \
    } \
}
</pre></div>
<p>Adjust a random-access offset to a code point boundary after a code point. </p>
<p>If the offset is behind a partial multi-byte sequence, then the offset is incremented to behind the whole sequence. Otherwise, it is not modified. The input offset may be the same as the string length. "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>starting string offset (usually 0) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;=i&lt;=length </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>string length </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a910ba47de6d82fafc25b5e12f3a68588" title="Adjust a random-access offset to a code point boundary after a code point.">U8_SET_CP_LIMIT_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002078">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00676">676</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="a910ba47de6d82fafc25b5e12f3a68588"></a><!-- doxytag: member="utf8.h::U8_SET_CP_LIMIT_UNSAFE" ref="a910ba47de6d82fafc25b5e12f3a68588" args="(s, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_SET_CP_LIMIT_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <a class="code" href="utf8_8h.html#a3969beb6252f8605ab678990c8af2f48" title="Move the string offset from one code point boundary to the previous one.">U8_BACK_1_UNSAFE</a>(s, i); \
    <a class="code" href="utf8_8h.html#a64a8113aea2125f806cbf5d77294b3cd" title="Advance the string offset from one code point boundary to the next.">U8_FWD_1_UNSAFE</a>(s, i); \
}
</pre></div>
<p>Adjust a random-access offset to a code point boundary after a code point. </p>
<p>If the offset is behind a partial multi-byte sequence, then the offset is incremented to behind the whole sequence. Otherwise, it is not modified. The input offset may be the same as the string length. "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#a40fe523809a3a4e647e47513336b81d9" title="Adjust a random-access offset to a code point boundary after a code point.">U8_SET_CP_LIMIT</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002077">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00656">656</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa6d33627a8a5420a8f61e50da2aeca2a"></a><!-- doxytag: member="utf8.h::U8_SET_CP_START" ref="aa6d33627a8a5420a8f61e50da2aeca2a" args="(s, start, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_SET_CP_START</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">start, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">if</span>(<a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>((s)[(i)])) { \
        (i)=<a class="code" href="utf8_8h.html#a4017310e2ecadac7dea5a432a33ccf30" title="Function for handling &amp;quot;skip backward one code point&amp;quot; with error-checking...">utf8_back1SafeBody</a>(s, start, (int32_t)(i)); \
    } \
}
</pre></div>
<p>Adjust a random-access offset to a code point boundary at the start of a code point. </p>
<p>If the offset points to a UTF-8 trail byte, then the offset is moved backward to the corresponding lead byte. Otherwise, it is not modified. "Safe" macro, checks for illegal sequences and for string boundaries.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>starting string offset (usually 0) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset, must be start&lt;=i </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#ac46a385dbf64c97337522e1d1875a57e" title="Adjust a random-access offset to a code point boundary at the start of a code point...">U8_SET_CP_START_UNSAFE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002070">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00487">487</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac46a385dbf64c97337522e1d1875a57e"></a><!-- doxytag: member="utf8.h::U8_SET_CP_START_UNSAFE" ref="ac46a385dbf64c97337522e1d1875a57e" args="(s, i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U8_SET_CP_START_UNSAFE</td>
          <td>(</td>
          <td class="paramtype">s, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">i&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
    <span class="keywordflow">while</span>(<a class="code" href="utf8_8h.html#afed9fc9bf480bf15a2e6051774f2d80e" title="Is this code unit (byte) a UTF-8 trail byte?">U8_IS_TRAIL</a>((s)[i])) { --(i); } \
}
</pre></div>
<p>Adjust a random-access offset to a code point boundary at the start of a code point. </p>
<p>If the offset points to a UTF-8 trail byte, then the offset is moved backward to the corresponding lead byte. Otherwise, it is not modified. "Unsafe" macro, assumes well-formed UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>const uint8_t * string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>string offset </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="utf8_8h.html#aa6d33627a8a5420a8f61e50da2aeca2a" title="Adjust a random-access offset to a code point boundary at the start of a code point...">U8_SET_CP_START</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002069">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00469">469</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a6cf17491f1c237bbe5b002056b830fd3"></a><!-- doxytag: member="utf8.h::utf8_appendCharSafeBody" ref="a6cf17491f1c237bbe5b002056b830fd3" args="(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t utf8_appendCharSafeBody </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&nbsp;</td>
          <td class="paramname"> <em>pIsError</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for handling "append code point" with error-checking. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this file and thus must remain stable, and should not be hidden when other internal functions are hidden (otherwise public macros would fail to compile). </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000128">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="a4017310e2ecadac7dea5a432a33ccf30"></a><!-- doxytag: member="utf8.h::utf8_back1SafeBody" ref="a4017310e2ecadac7dea5a432a33ccf30" args="(const uint8_t *s, int32_t start, int32_t i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t utf8_back1SafeBody </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>i</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for handling "skip backward one code point" with error-checking. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this file and thus must remain stable, and should not be hidden when other internal functions are hidden (otherwise public macros would fail to compile). </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000130">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="a6eaf56eb54abb71eafcc0c347daa821f"></a><!-- doxytag: member="utf8.h::utf8_nextCharSafeBody" ref="a6eaf56eb54abb71eafcc0c347daa821f" args="(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utf8_nextCharSafeBody </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>strict</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for handling "next code point" with error-checking. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this file and thus must remain stable, and should not be hidden when other internal functions are hidden (otherwise public macros would fail to compile). </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000127">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="a2bbae41d2d845750088a17dc55f59096"></a><!-- doxytag: member="utf8.h::utf8_prevCharSafeBody" ref="a2bbae41d2d845750088a17dc55f59096" args="(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> utf8_prevCharSafeBody </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>strict</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for handling "previous code point" with error-checking. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this file and thus must remain stable, and should not be hidden when other internal functions are hidden (otherwise public macros would fail to compile). </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000129">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a4e3ae25d5856272ab60ab87c28572a99"></a><!-- doxytag: member="utf8.h::utf8_countTrailBytes" ref="a4e3ae25d5856272ab60ab87c28572a99" args="[256]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="utf8_8h.html#a4e3ae25d5856272ab60ab87c28572a99">utf8_countTrailBytes</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal array with numbers of trail bytes for any given byte used in lead byte position. </p>
<p>This is internal since it is not meant to be called directly by external clients; however it is called by public macros in this file and thus must remain stable, and should not be hidden when other internal functions are hidden (otherwise public macros would fail to compile). </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000124">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

<p>Definition at line <a class="el" href="utf8_8h_source.html#l00062">62</a> of file <a class="el" href="utf8_8h_source.html">utf8.h</a>.</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

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

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