Sophie

Sophie

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

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: ubidi.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>ubidi.h File Reference</h1>
<p>C API: Bidi algorithm.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="uchar_8h_source.html">unicode/uchar.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br/>

<p><a href="ubidi_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><p><a class="anchor" id="amgrpd41d8cd98f00b204e9800998ecf8427e"></a> </p>
<br/><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40">UBIDI_DEFAULT_LTR</a>&nbsp;&nbsp;&nbsp;0xfe</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Paragraph level setting.  <a href="#a165ae276878c7a54fd8b067db0d12f40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d">UBIDI_DEFAULT_RTL</a>&nbsp;&nbsp;&nbsp;0xff</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Paragraph level setting.  <a href="#a0b4d6ac752ab7a8a33eb825e9c76683d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a">UBIDI_MAX_EXPLICIT_LEVEL</a>&nbsp;&nbsp;&nbsp;61</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum explicit embedding level.  <a href="#a531b2d2bfa7655df6bf86d1236a1928a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711">UBIDI_LEVEL_OVERRIDE</a>&nbsp;&nbsp;&nbsp;0x80</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bit flag for level input.  <a href="#a5e4049fa946dd8e0a1b3c01e5c1c3711"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171">UBIDI_MAP_NOWHERE</a>&nbsp;&nbsp;&nbsp;(-1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Special value which can be returned by the mapping functions when a logical index has no corresponding visual index or vice-versa.  <a href="#a6bdc9eb61fd6146789e9827bdbded171"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88">UBIDI_KEEP_BASE_COMBINING</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option flags for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>  <a href="#a2e022ccd0d2c55a21c2aa233c30ecd88"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0b1370dda1e3ad8ef9c94fd28320153d">UBIDI_DO_MIRRORING</a>&nbsp;&nbsp;&nbsp;2</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings  <a href="#a0b1370dda1e3ad8ef9c94fd28320153d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40">UBIDI_INSERT_LRM_FOR_NUMERIC</a>&nbsp;&nbsp;&nbsp;4</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse Bidi" algorithm  <a href="#adad66f9132bc4e4621427091acfc0f40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312">UBIDI_REMOVE_BIDI_CONTROLS</a>&nbsp;&nbsp;&nbsp;8</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: remove Bidi control characters (this does not affect <a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a>)  <a href="#a039000c1e298cbad5909d07a55ca5312"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3">UBIDI_OUTPUT_REVERSE</a>&nbsp;&nbsp;&nbsp;16</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: write the output in reverse order  <a href="#a4a10c3aac68ceca1569bac717156cef3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1">U_BIDI_CLASS_DEFAULT</a>&nbsp;&nbsp;&nbsp;U_CHAR_DIRECTION_COUNT</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">value returned by <code>UBiDiClassCallback</code> callbacks when there is no need to override the standard Bidi class for a given code point.  <a href="#ab74f3e4fed22db8d521e42f6a882b7a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> { <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3">UBIDI_LTR</a>, 
<a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a73e659e3118b58f822cc1384e7fcd8ec">UBIDI_RTL</a>, 
<a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d">UBIDI_MIXED</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p><code>UBiDiDirection</code> values indicate the text direction. </p>
 <a href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> { <br/>
&nbsp;&nbsp;<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b">UBIDI_REORDER_DEFAULT</a> =  0, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f">UBIDI_REORDER_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7">UBIDI_REORDER_GROUP_NUMBERS_WITH_R</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d">UBIDI_REORDER_RUNS_ONLY</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a>, 
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfae19ca6f8614a91e49454b21264f6a379">UBIDI_REORDER_COUNT</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use. </p>
 <a href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a> { <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb">UBIDI_OPTION_DEFAULT</a> =  0, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6">UBIDI_OPTION_INSERT_MARKS</a> =  1, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502">UBIDI_OPTION_REMOVE_CONTROLS</a> =  2, 
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7">UBIDI_OPTION_STREAMING</a> =  4
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm. </p>
 <a href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">UBiDiLevel is the type of the level values in this Bidi implementation.  <a href="#ab2460a19f323ab9787a79a95db91a606"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0d13f55bcc7116169db68b10733545f1">UBiDiDirection</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> (const void *context, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback type declaration for overriding default Bidi class values with custom ones.  <a href="#a77893628988f90ea58198aaac9c6fcea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f">ubidi_open</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure.  <a href="#a4b0163f0f98e1c0f8915f1a26813c07f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716">ubidi_openSized</a> (int32_t maxLength, int32_t maxRunCount, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures.  <a href="#a3d75a7eb9ecf1d5280dc2807efd64716"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5">ubidi_close</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object.">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object.  <a href="#a3c30f10761d8cfb6974e3b7dc6c35df5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4">ubidi_setInverse</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> isInverse)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modify the operation of the Bidi algorithm such that it approximates an "inverse Bidi" algorithm.  <a href="#a836b2eaf83ca712cf28e69cd4ba934f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a794e61b06b5eedaeff7c7e72fa78a8ba">ubidi_isInverse</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this Bidi object set to perform the inverse Bidi algorithm?  <a href="#a794e61b06b5eedaeff7c7e72fa78a8ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e">ubidi_orderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> orderParagraphsLTR)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify whether block separators must be allocated level zero, so that successive paragraphs will progress from left to right.  <a href="#ab7b9785b85169b3830034029729c672e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a612d1977d09d1b30a8a41296a85ccba4">ubidi_isOrderParagraphsLTR</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this Bidi object set to allocate level 0 to block separators so that successive paragraphs progress from left to right?  <a href="#a612d1977d09d1b30a8a41296a85ccba4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa">ubidi_setReorderingMode</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> reorderingMode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi algorithm or approximates an "inverse Bidi" algorithm, depending on different values of the "reordering mode".  <a href="#afe123acc1196c4d7363f968ca6af6faa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a98a1b2869aab8c9dec5effa7749e0369">ubidi_getReorderingMode</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">What is the requested reordering mode for a given Bidi object?  <a href="#a98a1b2869aab8c9dec5effa7749e0369"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de">ubidi_setReorderingOptions</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, uint32_t reorderingOptions)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify which of the reordering options should be applied during Bidi transformations.  <a href="#a25dd2aba9db100133217b9fe76de01de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a5186ae76f6abfcbaf700d2dc7625516e">ubidi_getReorderingOptions</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">What are the reordering options applied to a given Bidi object?  <a href="#a5186ae76f6abfcbaf700d2dc7625516e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11">ubidi_setPara</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *text, int32_t length, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> paraLevel, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *embeddingLevels, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform the Unicode Bidi algorithm.  <a href="#abdfe9e113a19dd8521d3b7ac8220fe11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a">ubidi_setLine</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pParaBiDi, int32_t start, int32_t limit, <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pLineBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> sets a <code>UBiDi</code> to contain the reordering information, especially the resolved levels, for all the characters in a line of text.  <a href="#ac7d96b281cd6ab2d56900bfdc37c808a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3">ubidi_getDirection</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the directionality of the text.  <a href="#af31ec52194764c663c224f5171e95ea3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#afc55abde2c543bdd5f4031e75d38bb02">ubidi_getText</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the pointer to the text.  <a href="#afc55abde2c543bdd5f4031e75d38bb02"></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="ubidi_8h.html#a8f51ac46083e7ce52b6bea4bc7ac14a8">ubidi_getLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the length of the text.  <a href="#a8f51ac46083e7ce52b6bea4bc7ac14a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a6724e673e9ff8f0ee47bd24e47ceb95a">ubidi_getParaLevel</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the paragraph level of the text.  <a href="#a6724e673e9ff8f0ee47bd24e47ceb95a"></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="ubidi_8h.html#a8f4b5bb9a8e37d8065490af4e6825563">ubidi_countParagraphs</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of paragraphs.  <a href="#a8f4b5bb9a8e37d8065490af4e6825563"></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="ubidi_8h.html#a5cd3d78464b8e3b71886a643f70f25ab">ubidi_getParagraph</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t charIndex, int32_t *pParaStart, int32_t *pParaLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a paragraph, given a position within the text.  <a href="#a5cd3d78464b8e3b71886a643f70f25ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0">ubidi_getParagraphByIndex</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t paraIndex, int32_t *pParaStart, int32_t *pParaLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pParaLevel, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a paragraph, given the index of this paragraph.  <a href="#a62377f811a750130246dfb49c1cc6dc0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ad363767eacb66359de7c639a722338c8">ubidi_getLevelAt</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t charIndex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the level for one character.  <a href="#ad363767eacb66359de7c639a722338c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ae498c62057ff75f31ca8cbdbf9cae4b7">ubidi_getLevels</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an array of levels for each character.  <a href="#ae498c62057ff75f31ca8cbdbf9cae4b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#aaa99079b617dcc6c15910558306b7145">ubidi_getLogicalRun</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t logicalPosition, int32_t *pLogicalLimit, <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *pLevel)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a logical run.  <a href="#aaa99079b617dcc6c15910558306b7145"></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="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99">ubidi_countRuns</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of runs.  <a href="#a18c2f5cfaf8c8717759d6e0feaa58c99"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894">ubidi_getVisualRun</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t runIndex, int32_t *pLogicalStart, int32_t *pLength)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL.  <a href="#ae923ec697e2eb77652fca9f1fcddc894"></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="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79">ubidi_getVisualIndex</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t logicalIndex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the visual position from a logical text position.  <a href="#a17696c56f06e1a48270f0ff3b69edd79"></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="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f">ubidi_getLogicalIndex</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t visualIndex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the logical text position from a visual position.  <a href="#a95ad84e638be70e73b23809fc132582f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c">ubidi_getLogicalMap</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t *indexMap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#a279cb5ce73e8ce2f820fd3c1fb8bb15c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2">ubidi_getVisualMap</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, int32_t *indexMap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object.  <a href="#af54771dbad2e4988fe9b00e55eede2e2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a18113b39aa14585407c8f003c0f86d56">ubidi_reorderLogical</a> (const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *levels, int32_t length, int32_t *indexMap)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#a18113b39aa14585407c8f003c0f86d56"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a01009fa9de9e31b124d5e8bdc2cf2a3e">ubidi_reorderVisual</a> (const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *levels, int32_t length, int32_t *indexMap)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is a convenience function that does not use a UBiDi object.  <a href="#a01009fa9de9e31b124d5e8bdc2cf2a3e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#af5d1e5272fb2eec21e89a026fb665610">ubidi_invertMap</a> (const int32_t *srcMap, int32_t *destMap, int32_t length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Invert an index map.  <a href="#af5d1e5272fb2eec21e89a026fb665610"></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="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5">ubidi_getProcessedLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the length of the source text processed by the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>.  <a href="#abf3d2acd9d73fb4a3a25deb0ebca28d5"></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="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8">ubidi_getResultLength</a> (const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the length of the reordered text resulting from the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>.  <a href="#a3247782277731ee82cfb3ba700f598a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a7e2bbf0e64c56a5e53f3e3524865ff76">ubidi_getCustomizedClass</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the Bidi class for a given code point.  <a href="#a7e2bbf0e64c56a5e53f3e3524865ff76"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21">ubidi_setClassCallback</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> *newFn, const void *newContext, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **oldFn, const void **oldContext, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback function and callback data used by the UBA implementation for Bidi class determination.  <a href="#a4acd99089d2c4f31495210a5462bcb21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778">ubidi_getClassCallback</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **fn, const void **context)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current callback function used for Bidi class determination.  <a href="#a0cafa2a8c29c03918c3a2cdf4ccea778"></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="ubidi_8h.html#a26790ff71c59f223ded4047da5626725">ubidi_writeReordered</a> (<a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *pBiDi, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destSize, uint16_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Take a <code>UBiDi</code> object containing the reordering information for a piece of text (one or more paragraphs) set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> and write a reordered string to the destination buffer.  <a href="#a26790ff71c59f223ded4047da5626725"></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="ubidi_8h.html#a2b0dd2bc3a984509545449d76cb1ed2e">ubidi_writeReverse</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destSize, uint16_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reverse a Right-To-Left run of Unicode text.  <a href="#a2b0dd2bc3a984509545449d76cb1ed2e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: Bidi algorithm. </p>
<h2>Bidi algorithm for ICU</h2>
<p>This is an implementation of the Unicode Bidirectional algorithm. The algorithm is defined in the <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Annex #9</a>, version 13, also described in The Unicode Standard, Version 4.0 .</p>
<p>Note: Libraries that perform a bidirectional algorithm and reorder strings accordingly are sometimes called "Storage Layout Engines". ICU's Bidi and shaping (<a class="el" href="ushape_8h.html#a1f89291c5a24a50b8f6dcad5eb4668f7" title="Shape Arabic text on a character basis.">u_shapeArabic()</a>) APIs can be used at the core of such "Storage Layout Engines".</p>
<h3>General remarks about the API:</h3>
<p>In functions with an error code parameter, the <code>pErrorCode</code> pointer must be valid and the value that it points to must not indicate a failure before the function call. Otherwise, the function returns immediately. After the function call, the value indicates success or failure.</p>
<p>The "limit" of a sequence of characters is the position just after their last character, i.e., one more than that position.</p>
<p>Some of the API functions provide access to "runs". Such a "run" is defined as a sequence of characters that are at the same embedding level after performing the Bidi algorithm.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Markus W. Scherer </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>1.0</dd></dl>
<h4>Sample code for the ICU Bidi API </h4>
<h5>Rendering a paragraph with the ICU Bidi API</h5>
<p>This is (hypothetical) sample code that illustrates how the ICU Bidi API could be used to render a paragraph of text. Rendering code depends highly on the graphics system, therefore this sample code must make a lot of assumptions, which may or may not match any existing graphics system's properties.</p>
<p>The basic assumptions are: </p>
<ul>
<li>
Rendering is done from left to right on a horizontal line. </li>
<li>
A run of single-style, unidirectional text can be rendered at once. </li>
<li>
Such a run of text is passed to the graphics system with characters (code units) in logical order. </li>
<li>
The line-breaking algorithm is very complicated and Locale-dependent - and therefore its implementation omitted from this sample code. </li>
</ul>
<pre>
 <div class="fragment"><pre class="fragment"> *#include <span class="stringliteral">&quot;unicode/ubidi.h&quot;</span>

 *<span class="keyword">typedef</span> <span class="keyword">enum</span> {
     styleNormal=0, styleSelected=1,
     styleBold=2, styleItalics=4,
     styleSuper=8, styleSub=16
 *} Style;

 *<span class="keyword">typedef</span> <span class="keyword">struct </span>{ int32_t limit; Style style; } StyleRun;

 *<span class="keywordtype">int</span> getTextWidth(<span class="keyword">const</span> <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> *text, int32_t start, int32_t limit,
                  <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount);

 <span class="comment">// set *pLimit and *pStyleRunLimit for a line</span>
 <span class="comment">// from text[start] and from styleRuns[styleRunStart]</span>
 <span class="comment">// using ubidi_getLogicalRun(para, ...)</span>
 *<span class="keywordtype">void</span> getLineBreak(<span class="keyword">const</span> <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> *text, int32_t start, int32_t *pLimit,
                  <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *para,
                  <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunStart, <span class="keywordtype">int</span> *pStyleRunLimit,
                  <span class="keywordtype">int</span> *pLineWidth);

 <span class="comment">// render runs on a line sequentially, always from left to right</span>

 <span class="comment">// prepare rendering a new line</span>
 <span class="keywordtype">void</span> startLine(<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction.">UBiDiDirection</a> textDirection, <span class="keywordtype">int</span> lineWidth);

 <span class="comment">// render a run of text and advance to the right by the run width</span>
 <span class="comment">// the text[start..limit-1] is always in logical order</span>
 <span class="keywordtype">void</span> renderRun(<span class="keyword">const</span> <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> *text, int32_t start, int32_t limit,
               <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction.">UBiDiDirection</a> textDirection, Style style);

 <span class="comment">// We could compute a cross-product</span>
 <span class="comment">// from the style runs with the directional runs</span>
 <span class="comment">// and then reorder it.</span>
 <span class="comment">// Instead, here we iterate over each run type</span>
 <span class="comment">// and render the intersections -</span>
 <span class="comment">// with shortcuts in simple (and common) cases.</span>
 <span class="comment">// renderParagraph() is the main function.</span>

 <span class="comment">// render a directional run with</span>
 <span class="comment">// (possibly) multiple style runs intersecting with it</span>
 <span class="keywordtype">void</span> renderDirectionalRun(<span class="keyword">const</span> <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> *text,
                           int32_t start, int32_t limit,
                           <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction.">UBiDiDirection</a> direction,
                           <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {
     <span class="keywordtype">int</span> i;

     <span class="comment">// iterate over style runs</span>
     <span class="keywordflow">if</span>(direction==<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3" title="All left-to-right text.">UBIDI_LTR</a>) {
         <span class="keywordtype">int</span> styleLimit;

         <span class="keywordflow">for</span>(i=0; i&lt;styleRunCount; ++i) {
             styleLimit=styleRun[i].limit;
             <span class="keywordflow">if</span>(start&lt;styleLimit) {
                 <span class="keywordflow">if</span>(styleLimit&gt;limit) { styleLimit=limit; }
                 renderRun(text, start, styleLimit,
                           direction, styleRun[i].style);
                 <span class="keywordflow">if</span>(styleLimit==limit) { <span class="keywordflow">break</span>; }
                 start=styleLimit;
             }
         }
     } <span class="keywordflow">else</span> {
         <span class="keywordtype">int</span> styleStart;

         <span class="keywordflow">for</span>(i=styleRunCount-1; i&gt;=0; --i) {
             <span class="keywordflow">if</span>(i&gt;0) {
                 styleStart=styleRun[i-1].limit;
             } <span class="keywordflow">else</span> {
                 styleStart=0;
             }
             <span class="keywordflow">if</span>(limit&gt;=styleStart) {
                 <span class="keywordflow">if</span>(styleStart&lt;start) { styleStart=start; }
                 renderRun(text, styleStart, limit,
                           direction, styleRun[i].style);
                 <span class="keywordflow">if</span>(styleStart==start) { <span class="keywordflow">break</span>; }
                 limit=styleStart;
             }
         }
     }
 }

 <span class="comment">// the line object represents text[start..limit-1]</span>
 <span class="keywordtype">void</span> renderLine(<a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *line, <span class="keyword">const</span> <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> *text,
                 int32_t start, int32_t limit,
                 <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount) {
     <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction.">UBiDiDirection</a> direction=<a class="code" href="ubidi_8h.html#af31ec52194764c663c224f5171e95ea3" title="Get the directionality of the text.">ubidi_getDirection</a>(line);
     <span class="keywordflow">if</span>(direction!=<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d" title="Mixed-directional text.">UBIDI_MIXED</a>) {
         <span class="comment">// unidirectional</span>
         <span class="keywordflow">if</span>(styleRunCount&lt;=1) {
             renderRun(text, start, limit, direction, styleRuns[0].style);
         } <span class="keywordflow">else</span> {
             renderDirectionalRun(text, start, limit,
                                  direction, styleRuns, styleRunCount);
         }
     } <span class="keywordflow">else</span> {
         <span class="comment">// mixed-directional</span>
         int32_t count, i, length;
         <a class="code" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation.">UBiDiLevel</a> level;

         count=<a class="code" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs.">ubidi_countRuns</a>(para, pErrorCode);
         <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS</a>(*pErrorCode)) {
             <span class="keywordflow">if</span>(styleRunCount&lt;=1) {
                 Style style=styleRuns[0].style;

                 <span class="comment">// iterate over directional runs</span>
                <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
                    direction=<a class="code" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&amp;#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun</a>(para, i, &amp;start, &amp;length);
                     renderRun(text, start, start+length, direction, style);
                }
             } <span class="keywordflow">else</span> {
                 int32_t j;

                 <span class="comment">// iterate over both directional and style runs</span>
                 <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
                     direction=<a class="code" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&amp;#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun</a>(line, i, &amp;start, &amp;length);
                     renderDirectionalRun(text, start, start+length,
                                          direction, styleRuns, styleRunCount);
                 }
             }
         }
     }
 }

 *<span class="keywordtype">void</span> renderParagraph(<span class="keyword">const</span> <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> *text, int32_t length,
                     <a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102" title="UBiDiDirection values indicate the text direction.">UBiDiDirection</a> textDirection,
                      <span class="keyword">const</span> StyleRun *styleRuns, <span class="keywordtype">int</span> styleRunCount,
                      <span class="keywordtype">int</span> lineWidth,
                      <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> *pErrorCode) {
     <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *para;

     <span class="keywordflow">if</span>(pErrorCode==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a> || <a class="code" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE</a>(*pErrorCode) || length&lt;=0) {
         <span class="keywordflow">return</span>;
     }

     para=<a class="code" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716" title="Allocate a UBiDi structure with preallocated memory for internal structures.">ubidi_openSized</a>(length, 0, pErrorCode);
     <span class="keywordflow">if</span>(para==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>) { <span class="keywordflow">return</span>; }

     <a class="code" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a>(para, text, length,
                   textDirection ? <a class="code" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d" title="Paragraph level setting.">UBIDI_DEFAULT_RTL</a> : <a class="code" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40" title="Paragraph level setting.">UBIDI_DEFAULT_LTR</a>,
                   <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>, pErrorCode);
     <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS</a>(*pErrorCode)) {
         <a class="code" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation.">UBiDiLevel</a> paraLevel=1&amp;<a class="code" href="ubidi_8h.html#a6724e673e9ff8f0ee47bd24e47ceb95a" title="Get the paragraph level of the text.">ubidi_getParaLevel</a>(para);
         StyleRun styleRun={ length, styleNormal };
         <span class="keywordtype">int</span> width;

         <span class="keywordflow">if</span>(styleRuns==<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a> || styleRunCount&lt;=0) {
            styleRunCount=1;
             styleRuns=&amp;styleRun;
         }

        <span class="comment">// assume styleRuns[styleRunCount-1].limit&gt;=length</span>

         width=getTextWidth(text, 0, length, styleRuns, styleRunCount);
         <span class="keywordflow">if</span>(width&lt;=lineWidth) {
             <span class="comment">// everything fits onto one line</span>

            <span class="comment">// prepare rendering a new line from either left or right</span>
             startLine(paraLevel, width);

             renderLine(para, text, 0, length,
                        styleRuns, styleRunCount);
         } <span class="keywordflow">else</span> {
             <a class="code" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *line;

             <span class="comment">// we need to render several lines</span>
             line=<a class="code" href="ubidi_8h.html#a3d75a7eb9ecf1d5280dc2807efd64716" title="Allocate a UBiDi structure with preallocated memory for internal structures.">ubidi_openSized</a>(length, 0, pErrorCode);
             <span class="keywordflow">if</span>(line!=<a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>) {
                 int32_t start=0, limit;
                 <span class="keywordtype">int</span> styleRunStart=0, styleRunLimit;

                 <span class="keywordflow">for</span>(;;) {
                     limit=length;
                     styleRunLimit=styleRunCount;
                     getLineBreak(text, start, &amp;limit, para,
                                  styleRuns, styleRunStart, &amp;styleRunLimit,
                                 &amp;width);
                     <a class="code" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine</a>(para, start, limit, line, pErrorCode);
                     <span class="keywordflow">if</span>(<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS</a>(*pErrorCode)) {
                         <span class="comment">// prepare rendering a new line</span>
                         <span class="comment">// from either left or right</span>
                         startLine(paraLevel, width);

                         renderLine(line, text, start, limit,
                                    styleRuns+styleRunStart,
                                    styleRunLimit-styleRunStart);
                     }
                     <span class="keywordflow">if</span>(limit==length) { <span class="keywordflow">break</span>; }
                     start=limit;
                     styleRunStart=styleRunLimit-1;
                     <span class="keywordflow">if</span>(start&gt;=styleRuns[styleRunStart].limit) {
                         ++styleRunStart;
                     }
                 }

                 <a class="code" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object.">ubidi_close</a>(line);
             }
        }
    }

     <a class="code" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object.">ubidi_close</a>(para);
 *}
 *
</pre></div>
 </pre> 
<p>Definition in file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ab74f3e4fed22db8d521e42f6a882b7a1"></a><!-- doxytag: member="ubidi.h::U_BIDI_CLASS_DEFAULT" ref="ab74f3e4fed22db8d521e42f6a882b7a1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_BIDI_CLASS_DEFAULT&nbsp;&nbsp;&nbsp;U_CHAR_DIRECTION_COUNT</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>value returned by <code>UBiDiClassCallback</code> callbacks when there is no need to override the standard Bidi class for a given code point. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones...">UBiDiClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000443">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01815">1815</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a165ae276878c7a54fd8b067db0d12f40"></a><!-- doxytag: member="ubidi.h::UBIDI_DEFAULT_LTR" ref="a165ae276878c7a54fd8b067db0d12f40" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_LTR&nbsp;&nbsp;&nbsp;0xfe</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Paragraph level setting. </p>
<p>Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then set the paragraph level to 0 (left-to-right).</p>
<p>If this value is used in conjunction with reordering modes <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder is assumed to be visual LTR, and the text after reordering is required to be the corresponding logical string with appropriate contextual direction. The direction of the result string will be RTL if either the righmost or leftmost strong character of the source text is RTL or Arabic Letter, the direction will be LTR otherwise.</p>
<p>If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may be added at the beginning of the result string to ensure round trip (that the result string, when reordered back to visual, will produce the original source text). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm...">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000393">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00357">357</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0b4d6ac752ab7a8a33eb825e9c76683d"></a><!-- doxytag: member="ubidi.h::UBIDI_DEFAULT_RTL" ref="a0b4d6ac752ab7a8a33eb825e9c76683d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DEFAULT_RTL&nbsp;&nbsp;&nbsp;0xff</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Paragraph level setting. </p>
<p>Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then set the paragraph level to 1 (right-to-left).</p>
<p>If this value is used in conjunction with reordering modes <code>UBIDI_REORDER_INVERSE_LIKE_DIRECT</code> or <code>UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</code>, the text to reorder is assumed to be visual LTR, and the text after reordering is required to be the corresponding logical string with appropriate contextual direction. The direction of the result string will be RTL if either the righmost or leftmost strong character of the source text is RTL or Arabic Letter, or if the text contains no strong character; the direction will be LTR otherwise.</p>
<p>If reordering option <code>UBIDI_OPTION_INSERT_MARKS</code> is set, an RLM may be added at the beginning of the result string to ensure round trip (that the result string, when reordered back to visual, will produce the original source text). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm...">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000394">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00384">384</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0b1370dda1e3ad8ef9c94fd28320153d"></a><!-- doxytag: member="ubidi.h::UBIDI_DO_MIRRORING" ref="a0b1370dda1e3ad8ef9c94fd28320153d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_DO_MIRRORING&nbsp;&nbsp;&nbsp;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: replace characters with the "mirrored" property in RTL runs by their mirror-image mappings </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000437">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01692">1692</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

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

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: surround the run with LRMs if necessary; this is part of the approximate "inverse Bidi" algorithm </p>
<p>This option does not imply corresponding adjustment of the index mappings.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000438">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01706">1706</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2e022ccd0d2c55a21c2aa233c30ecd88"></a><!-- doxytag: member="ubidi.h::UBIDI_KEEP_BASE_COMBINING" ref="a2e022ccd0d2c55a21c2aa233c30ecd88" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_KEEP_BASE_COMBINING&nbsp;&nbsp;&nbsp;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>option flags for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a> </p>
<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: keep combining characters after their base characters in RTL runs </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000436">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01682">1682</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5e4049fa946dd8e0a1b3c01e5c1c3711"></a><!-- doxytag: member="ubidi.h::UBIDI_LEVEL_OVERRIDE" ref="a5e4049fa946dd8e0a1b3c01e5c1c3711" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_LEVEL_OVERRIDE&nbsp;&nbsp;&nbsp;0x80</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Bit flag for level input. </p>
<p>Overrides directional properties. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000396">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00397">397</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6bdc9eb61fd6146789e9827bdbded171"></a><!-- doxytag: member="ubidi.h::UBIDI_MAP_NOWHERE" ref="a6bdc9eb61fd6146789e9827bdbded171" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAP_NOWHERE&nbsp;&nbsp;&nbsp;(-1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Special value which can be returned by the mapping functions when a logical index has no corresponding visual index or vice-versa. </p>
<p>This may happen for the logical-to-visual mapping of a Bidi control when option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code> is specified. This can also happen for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted by option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position.">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position.">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph...">ubidi_getLogicalMap</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000397">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00412">412</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a531b2d2bfa7655df6bf86d1236a1928a"></a><!-- doxytag: member="ubidi.h::UBIDI_MAX_EXPLICIT_LEVEL" ref="a531b2d2bfa7655df6bf86d1236a1928a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_MAX_EXPLICIT_LEVEL&nbsp;&nbsp;&nbsp;61</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Maximum explicit embedding level. </p>
<p>(The maximum resolved level can be up to <code>UBIDI_MAX_EXPLICIT_LEVEL+1</code>). </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000395">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00391">391</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4a10c3aac68ceca1569bac717156cef3"></a><!-- doxytag: member="ubidi.h::UBIDI_OUTPUT_REVERSE" ref="a4a10c3aac68ceca1569bac717156cef3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_OUTPUT_REVERSE&nbsp;&nbsp;&nbsp;16</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: write the output in reverse order </p>
<p>This has the same effect as calling <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> first without this option, and then calling <code><a class="el" href="ubidi_8h.html#a2b0dd2bc3a984509545449d76cb1ed2e" title="Reverse a Right-To-Left run of Unicode text.">ubidi_writeReverse()</a></code> without mirroring. Doing this in the same step is faster and avoids a temporary buffer. An example for using this option is output to a character terminal that is designed for RTL scripts and stores text in reverse order.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000440">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01735">1735</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a039000c1e298cbad5909d07a55ca5312"></a><!-- doxytag: member="ubidi.h::UBIDI_REMOVE_BIDI_CONTROLS" ref="a039000c1e298cbad5909d07a55ca5312" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UBIDI_REMOVE_BIDI_CONTROLS&nbsp;&nbsp;&nbsp;8</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>option bit for <a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a>: remove Bidi control characters (this does not affect <a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a>) </p>
<p>This option does not imply corresponding adjustment of the index mappings.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000439">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01719">1719</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="aeed24292bbed966df93f088bc6791f74"></a><!-- doxytag: member="ubidi.h::UBiDi" ref="aeed24292bbed966df93f088bc6791f74" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000401">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00443">443</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a77893628988f90ea58198aaac9c6fcea"></a><!-- doxytag: member="ubidi.h::UBiDiClassCallback" ref="a77893628988f90ea58198aaac9c6fcea" args="(const void *context, UChar32 c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a> <a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a>(const void *context, <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Callback type declaration for overriding default Bidi class values with custom ones. </p>
<p>Usually, the function pointer will be propagated to a <code>UBiDi</code> object by calling the <code><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi...">ubidi_setClassCallback()</a></code> function; then the callback will be invoked by the UBA implementation any time the class of a character is to be determined.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>is a pointer to the callback private data.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>is the code point to get a Bidi class for.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The directional property / Bidi class for the given code point <code>c</code> if the default class has been overridden, or <code><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1" title="value returned by UBiDiClassCallback callbacks when there is no need to override...">U_BIDI_CLASS_DEFAULT</a></code> if the standard Bidi class value for <code>c</code> is to be used. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi...">ubidi_setClassCallback</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778" title="Get the current callback function used for Bidi class determination.">ubidi_getClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000444">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l01838">1838</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0d13f55bcc7116169db68b10733545f1"></a><!-- doxytag: member="ubidi.h::UBiDiDirection" ref="a0d13f55bcc7116169db68b10733545f1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000399">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00428">428</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab2460a19f323ab9787a79a95db91a606"></a><!-- doxytag: member="ubidi.h::UBiDiLevel" ref="ab2460a19f323ab9787a79a95db91a606" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint8_t <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>UBiDiLevel is the type of the level values in this Bidi implementation. </p>
<p>It holds an embedding level and indicates the visual direction by its bit&nbsp;0 (even/odd value).</p>
<p>It can also hold non-level values for the <code>paraLevel</code> and <code>embeddingLevels</code> arguments of <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>; there: </p>
<ul>
<li>
bit&nbsp;7 of an <code>embeddingLevels[]</code> value indicates whether the using application is specifying the level of a character to <em>override</em> whatever the Bidi implementation would resolve it to. </li>
<li>
<code>paraLevel</code> can be set to the pseudo-level values <code>UBIDI_DEFAULT_LTR</code> and <code>UBIDI_DEFAULT_RTL</code>. </li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a></dd></dl>
<p>The related constants are not real, valid level values. <code>UBIDI_DEFAULT_XXX</code> can be used to specify a default for the paragraph level for when the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> function shall determine it but there is no strongly typed character in the input.</p>
<p>Note that the value for <code>UBIDI_DEFAULT_LTR</code> is even and the one for <code>UBIDI_DEFAULT_RTL</code> is odd, just like with normal LTR and RTL level values - these special values are designed that way. Also, the implementation assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40" title="Paragraph level setting.">UBIDI_DEFAULT_LTR</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d" title="Paragraph level setting.">UBIDI_DEFAULT_RTL</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711" title="Bit flag for level input.">UBIDI_LEVEL_OVERRIDE</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a" title="Maximum explicit embedding level.">UBIDI_MAX_EXPLICIT_LEVEL</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000392">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00331">331</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102"></a><!-- doxytag: member="ubidi.h::UBiDiDirection" ref="a68a6b5fdcbf80aaa51b5bd39f7f31102" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><code>UBiDiDirection</code> values indicate the text direction. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000398">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3"></a><!-- doxytag: member="UBIDI_LTR" ref="a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3" args="" -->UBIDI_LTR</em>&nbsp;</td><td>
<p>All left-to-right text. </p>
<p>This is a 0 value. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000450">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a73e659e3118b58f822cc1384e7fcd8ec"></a><!-- doxytag: member="UBIDI_RTL" ref="a68a6b5fdcbf80aaa51b5bd39f7f31102a73e659e3118b58f822cc1384e7fcd8ec" args="" -->UBIDI_RTL</em>&nbsp;</td><td>
<p>All right-to-left text. </p>
<p>This is a 1 value. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000451">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d"></a><!-- doxytag: member="UBIDI_MIXED" ref="a68a6b5fdcbf80aaa51b5bd39f7f31102a5cc55b0dc99fa2ef003c7a8beb00844d" args="" -->UBIDI_MIXED</em>&nbsp;</td><td>
<p>Mixed-directional text. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000452">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00418">418</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56df"></a><!-- doxytag: member="ubidi.h::UBiDiReorderingMode" ref="a88693e5a8ad4be974dc90ec6b8db56df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><code>UBiDiReorderingMode</code> values indicate which variant of the Bidi algorithm to use. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000409">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b"></a><!-- doxytag: member="UBIDI_REORDER_DEFAULT" ref="a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" args="" -->UBIDI_REORDER_DEFAULT</em>&nbsp;</td><td>
<p>Regular Logical to Visual Bidi algorithm according to Unicode. </p>
<p>This is a 0 value. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000453">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f"></a><!-- doxytag: member="UBIDI_REORDER_NUMBERS_SPECIAL" ref="a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f" args="" -->UBIDI_REORDER_NUMBERS_SPECIAL</em>&nbsp;</td><td>
<p>Logical to Visual algorithm which handles numbers in a way which mimicks the behavior of Windows XP. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000454">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7"></a><!-- doxytag: member="UBIDI_REORDER_GROUP_NUMBERS_WITH_R" ref="a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7" args="" -->UBIDI_REORDER_GROUP_NUMBERS_WITH_R</em>&nbsp;</td><td>
<p>Logical to Visual algorithm grouping numbers with adjacent R characters (reversible algorithm). </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000455">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d"></a><!-- doxytag: member="UBIDI_REORDER_RUNS_ONLY" ref="a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" args="" -->UBIDI_REORDER_RUNS_ONLY</em>&nbsp;</td><td>
<p>Reorder runs only to transform a Logical LTR string to the Logical RTL string with the same display, or vice-versa. </p>
<p><br/>
 If this mode is set together with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>, some Bidi controls in the source text may be removed and other controls may be added to produce the minimum combination which has the required display. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000456">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_NUMBERS_AS_L" ref="a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" args="" -->UBIDI_REORDER_INVERSE_NUMBERS_AS_L</em>&nbsp;</td><td>
<p>Visual to Logical algorithm which handles numbers like L (same algorithm as selected by <code>ubidi_setInverse(TRUE)</code>. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse...">ubidi_setInverse</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000457">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_LIKE_DIRECT" ref="a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" args="" -->UBIDI_REORDER_INVERSE_LIKE_DIRECT</em>&nbsp;</td><td>
<p>Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000458">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e"></a><!-- doxytag: member="UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL" ref="a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" args="" -->UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</em>&nbsp;</td><td>
<p>Inverse Bidi (Visual to Logical) algorithm for the <code>UBIDI_REORDER_NUMBERS_SPECIAL</code> Bidi algorithm. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000459">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a88693e5a8ad4be974dc90ec6b8db56dfae19ca6f8614a91e49454b21264f6a379"></a><!-- doxytag: member="UBIDI_REORDER_COUNT" ref="a88693e5a8ad4be974dc90ec6b8db56dfae19ca6f8614a91e49454b21264f6a379" args="" -->UBIDI_REORDER_COUNT</em>&nbsp;</td><td>
<p>Number of values for reordering mode. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000460">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
</table>
</dd>
</dl>

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

</div>
</div>
<a class="anchor" id="a4505e4adc8da792501414b770f49f386"></a><!-- doxytag: member="ubidi.h::UBiDiReorderingOption" ref="a4505e4adc8da792501414b770f49f386" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386">UBiDiReorderingOption</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><code>UBiDiReorderingOption</code> values indicate which options are specified to affect the Bidi algorithm. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000412">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb"></a><!-- doxytag: member="UBIDI_OPTION_DEFAULT" ref="a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb" args="" -->UBIDI_OPTION_DEFAULT</em>&nbsp;</td><td>
<p>option value for <code>ubidi_setReorderingOptions</code>: disable all the options which can be set with this function </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000461">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6"></a><!-- doxytag: member="UBIDI_OPTION_INSERT_MARKS" ref="a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" args="" -->UBIDI_OPTION_INSERT_MARKS</em>&nbsp;</td><td>
<p>option bit for <code>ubidi_setReorderingOptions</code>: insert Bidi marks (LRM or RLM) when needed to ensure correct result of a reordering to a Logical order </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option is significant only with reordering modes which generate a result with Logical order, specifically: </p>
<ul>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" title="Reorder runs only to transform a Logical LTR string to the Logical RTL string with...">UBIDI_REORDER_RUNS_ONLY</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm...">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a></code> </li>
<li>
<code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a></code> </li>
</ul>
<p>If this option is set in conjunction with reordering mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> or with calling <code>ubidi_setInverse(TRUE)</code>, it implies option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>.</p>
<p>For other reordering modes, a minimum number of LRM or RLM characters will be added to the source text after reordering it so as to ensure round trip, i.e. when applying the inverse reordering mode on the resulting logical text with removal of Bidi marks (option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code> set before calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or option <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does...">UBIDI_REMOVE_BIDI_CONTROLS</a></code> in <code>ubidi_writeReordered</code>), the result will be identical to the source text in the first transformation.</p>
<p>This option will be ignored if specified together with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. It inhibits option <code>UBIDI_REMOVE_BIDI_CONTROLS</code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> if the reordering mode is <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000462">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502"></a><!-- doxytag: member="UBIDI_OPTION_REMOVE_CONTROLS" ref="a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" args="" -->UBIDI_OPTION_REMOVE_CONTROLS</em>&nbsp;</td><td>
<p>option bit for <code>ubidi_setReorderingOptions</code>: remove Bidi control characters </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option nullifies option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>. It inhibits option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to function <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> and it implies option <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does...">UBIDI_REMOVE_BIDI_CONTROLS</a></code> in calls to that function.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000463">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7"></a><!-- doxytag: member="UBIDI_OPTION_STREAMING" ref="a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" args="" -->UBIDI_OPTION_STREAMING</em>&nbsp;</td><td>
<p>option bit for <code>ubidi_setReorderingOptions</code>: process the output as part of a stream to be continued </p>
<p>This option must be set or reset before calling <code>ubidi_setPara</code>.</p>
<p>This option specifies that the caller is interested in processing large text object in parts. The results of the successive calls are expected to be concatenated by the caller. Only the call for the last part will have this option bit off.</p>
<p>When this option bit is on, <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> may process less than the full source text in order to truncate the text at a meaningful boundary. The caller should call <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength()</a></code> immediately after calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> in order to determine how much of the source text has been processed. Source text beyond that length should be resubmitted in following calls to <code>ubidi_setPara</code>. The processed length may be less than the length of the source text if a character preceding the last character of the source text constitutes a reasonable boundary (like a block separator) for text to be continued.<br/>
 If the last character of the source text constitutes a reasonable boundary, the whole text will be processed at once.<br/>
 If nowhere in the source text there exists such a reasonable boundary, the processed length will be zero.<br/>
 The caller should check for such an occurrence and do one of the following: </p>
<ul>
<li>
submit a larger amount of text with a better chance to include a reasonable boundary. </li>
<li>
resubmit the same text after turning off option <code>UBIDI_OPTION_STREAMING</code>.</li>
</ul>
<p>In all cases, this option should be turned off before processing the last part of the text.</p>
<p>When the <code>UBIDI_OPTION_STREAMING</code> option is used, it is recommended to call <code><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive...">ubidi_orderParagraphsLTR()</a></code> with argument <code>orderParagraphsLTR</code> set to <code>TRUE</code> before calling <code>ubidi_setPara</code> so that later paragraphs may be concatenated to previous paragraphs on the right.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive...">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000464">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="ubidi_8h_source.html#l00867">867</a> of file <a class="el" href="ubidi_8h_source.html">ubidi.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3c30f10761d8cfb6974e3b7dc6c35df5"></a><!-- doxytag: member="ubidi.h::ubidi_close" ref="a3c30f10761d8cfb6974e3b7dc6c35df5" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object.">ubidi_close()</a></code> must be called to free the memory associated with a UBiDi object. </p>
<p><b>Important: </b> A parent <code>UBiDi</code> object must not be destroyed or reused if it still has children. If a <code>UBiDi</code> object has become the <em>child</em> of another one (its <em>parent</em>) by calling <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code>, then the child object must be destroyed (closed) or reused (by calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code>) before the parent object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000404">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a8f4b5bb9a8e37d8065490af4e6825563"></a><!-- doxytag: member="ubidi.h::ubidi_countParagraphs" ref="a8f4b5bb9a8e37d8065490af4e6825563" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_countParagraphs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of paragraphs. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of paragraphs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000421">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a18c2f5cfaf8c8717759d6e0feaa58c99"></a><!-- doxytag: member="ubidi.h::ubidi_countRuns" ref="a18c2f5cfaf8c8717759d6e0feaa58c99" args="(UBiDi *pBiDi, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_countRuns </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of runs. </p>
<p>This function may invoke the actual reordering on the <code>UBiDi</code> object, after <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> may have resolved only the levels of the text. Therefore, <code><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs.">ubidi_countRuns()</a></code> may have to allocate memory, and may fail doing so.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of runs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000427">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a0cafa2a8c29c03918c3a2cdf4ccea778"></a><!-- doxytag: member="ubidi.h::ubidi_getClassCallback" ref="a0cafa2a8c29c03918c3a2cdf4ccea778" args="(UBiDi *pBiDi, UBiDiClassCallback **fn, const void **context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getClassCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **&nbsp;</td>
          <td class="paramname"> <em>fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&nbsp;</td>
          <td class="paramname"> <em>context</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the current callback function used for Bidi class determination. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fn</em>&nbsp;</td><td>fillin: Returns the callback function pointer.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>fillin: Returns the callback's private context.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a4acd99089d2c4f31495210a5462bcb21" title="Set the callback function and callback data used by the UBA implementation for Bidi...">ubidi_setClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000447">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a7e2bbf0e64c56a5e53f3e3524865ff76"></a><!-- doxytag: member="ubidi.h::ubidi_getCustomizedClass" ref="a7e2bbf0e64c56a5e53f3e3524865ff76" args="(UBiDi *pBiDi, UChar32 c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uchar_8h.html#a50325108b69e7d08315b5854f85f0593">UCharDirection</a> ubidi_getCustomizedClass </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</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><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the Bidi class for a given code point. </p>
<p>If a <code><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones...">UBiDiClassCallback</a></code> callback is defined and returns a value other than <code><a class="el" href="ubidi_8h.html#ab74f3e4fed22db8d521e42f6a882b7a1" title="value returned by UBiDiClassCallback callbacks when there is no need to override...">U_BIDI_CLASS_DEFAULT</a></code>, that value is used; otherwise the default class determination mechanism is invoked.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>is the code point whose Bidi class must be retrieved.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The Bidi class for character <code>c</code> based on the given <code>pBiDi</code> instance. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea" title="Callback type declaration for overriding default Bidi class values with custom ones...">UBiDiClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000445">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="af31ec52194764c663c224f5171e95ea3"></a><!-- doxytag: member="ubidi.h::ubidi_getDirection" ref="af31ec52194764c663c224f5171e95ea3" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> ubidi_getDirection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the directionality of the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a value of <code>UBIDI_LTR</code>, <code>UBIDI_RTL</code> or <code>UBIDI_MIXED</code> that indicates if the entire text represented by this object is unidirectional, and which direction, or if it is mixed-directional.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a0d13f55bcc7116169db68b10733545f1">UBiDiDirection</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000417">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Referenced by <a class="el" href="ParagraphLayout_8h_source.html#l00643">ParagraphLayout::getTextDirection()</a>.</p>

</div>
</div>
<a class="anchor" id="a8f51ac46083e7ce52b6bea4bc7ac14a8"></a><!-- doxytag: member="ubidi.h::ubidi_getLength" ref="a8f51ac46083e7ce52b6bea4bc7ac14a8" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the length of the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the text that the UBiDi object was created for. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000419">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad363767eacb66359de7c639a722338c8"></a><!-- doxytag: member="ubidi.h::ubidi_getLevelAt" ref="ad363767eacb66359de7c639a722338c8" args="(const UBiDi *pBiDi, int32_t charIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> ubidi_getLevelAt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>charIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the level for one character. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>charIndex</em>&nbsp;</td><td>the index of a character. It must be in the range [0..ubidi_getProcessedLength(pBiDi)].</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The level for the character at charIndex (0 if charIndex is not in the valid range).</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation.">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000424">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae498c62057ff75f31ca8cbdbf9cae4b7"></a><!-- doxytag: member="ubidi.h::ubidi_getLevels" ref="ae498c62057ff75f31ca8cbdbf9cae4b7" args="(UBiDi *pBiDi, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>* ubidi_getLevels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an array of levels for each character. </p>
<p>Note that this function may allocate memory under some circumstances, unlike <code><a class="el" href="ubidi_8h.html#ad363767eacb66359de7c639a722338c8" title="Get the level for one character.">ubidi_getLevelAt()</a></code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object, whose text length must be strictly positive.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The levels array for the text, or <code>NULL</code> if an error occurs.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation.">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000425">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a95ad84e638be70e73b23809fc132582f"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalIndex" ref="a95ad84e638be70e73b23809fc132582f" args="(UBiDi *pBiDi, int32_t visualIndex, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getLogicalIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>visualIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the logical text position from a visual position. </p>
<p>If such a mapping is used many times on the same <code>UBiDi</code> object, then calling <code><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph...">ubidi_getVisualMap()</a></code> is more efficient.</p>
<p>The value returned may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index...">UBIDI_MAP_NOWHERE</a></code> if there is no logical position because the corresponding text character is a Bidi mark inserted in the output by option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p>
<p>This is the inverse function to <code><a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position.">ubidi_getVisualIndex()</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical position returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>visualIndex</em>&nbsp;</td><td>is the visual position of a character.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The index of this character in the text.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position.">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara()...">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000430">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a279cb5ce73e8ce2f820fd3c1fb8bb15c"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalMap" ref="a279cb5ce73e8ce2f820fd3c1fb8bb15c" args="(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getLogicalMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph or line) object. </p>
<p>Some values in the map may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index...">UBIDI_MAP_NOWHERE</a></code> if the corresponding text characters are Bidi controls removed from the visual output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual positions returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. </p>
<p>Note that in right-to-left runs, this mapping places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered()">UBIDI_KEEP_BASE_COMBINING</a></code> option can be considered instead of using the mapping, in order to avoid these issues.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code> is set, the number of elements allocated in <code>indexMap</code> must be no less than <code><a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara()...">ubidi_getResultLength()</a></code>. The array does not need to be initialized.<br/>
<br/>
 The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph...">ubidi_getVisualMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a17696c56f06e1a48270f0ff3b69edd79" title="Get the visual position from a logical text position.">ubidi_getVisualIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara()...">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000431">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aaa99079b617dcc6c15910558306b7145"></a><!-- doxytag: member="ubidi.h::ubidi_getLogicalRun" ref="aaa99079b617dcc6c15910558306b7145" args="(const UBiDi *pBiDi, int32_t logicalPosition, int32_t *pLogicalLimit, UBiDiLevel *pLevel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getLogicalRun </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>logicalPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pLogicalLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>pLevel</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a logical run. </p>
<p>This function returns information about a run and is used to retrieve runs in logical order.</p>
<p>This is especially useful for line-breaking on a paragraph.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>logicalPosition</em>&nbsp;</td><td>is a logical position within the source text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLogicalLimit</em>&nbsp;</td><td>will receive the limit of the corresponding run. The l-value that you point to here may be the same expression (variable) as the one for <code>logicalPosition</code>. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLevel</em>&nbsp;</td><td>will receive the level of the corresponding run. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000426">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a5cd3d78464b8e3b71886a643f70f25ab"></a><!-- doxytag: member="ubidi.h::ubidi_getParagraph" ref="a5cd3d78464b8e3b71886a643f70f25ab" args="(const UBiDi *pBiDi, int32_t charIndex, int32_t *pParaStart, int32_t *pParaLimit, UBiDiLevel *pParaLevel, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getParagraph </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>charIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pParaLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a paragraph, given a position within the text. </p>
<p>This function returns information about a paragraph.<br/>
 Note: if the paragraph index is known, it is more efficient to retrieve the paragraph information using <a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0" title="Get a paragraph, given the index of this paragraph.">ubidi_getParagraphByIndex()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>charIndex</em>&nbsp;</td><td>is the index of a character within the text, in the range <code>[0..ubidi_getProcessedLength(pBiDi)-1]</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaStart</em>&nbsp;</td><td>will receive the index of the first character of the paragraph in the text. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaLimit</em>&nbsp;</td><td>will receive the limit of the paragraph. The l-value that you point to here may be the same expression (variable) as the one for <code>charIndex</code>. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaLevel</em>&nbsp;</td><td>will receive the level of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The index of the paragraph containing the specified position.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000422">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a62377f811a750130246dfb49c1cc6dc0"></a><!-- doxytag: member="ubidi.h::ubidi_getParagraphByIndex" ref="a62377f811a750130246dfb49c1cc6dc0" args="(const UBiDi *pBiDi, int32_t paraIndex, int32_t *pParaStart, int32_t *pParaLimit, UBiDiLevel *pParaLevel, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getParagraphByIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>paraIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pParaStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pParaLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a paragraph, given the index of this paragraph. </p>
<p>This function returns information about a paragraph.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>paraIndex</em>&nbsp;</td><td>is the number of the paragraph, in the range <code>[0..ubidi_countParagraphs(pBiDi)-1]</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaStart</em>&nbsp;</td><td>will receive the index of the first character of the paragraph in the text. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaLimit</em>&nbsp;</td><td>will receive the limit of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pParaLevel</em>&nbsp;</td><td>will receive the level of the paragraph. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000423">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a6724e673e9ff8f0ee47bd24e47ceb95a"></a><!-- doxytag: member="ubidi.h::ubidi_getParaLevel" ref="a6724e673e9ff8f0ee47bd24e47ceb95a" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> ubidi_getParaLevel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the paragraph level of the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The paragraph level. If there are multiple paragraphs, their level may vary if the required paraLevel is UBIDI_DEFAULT_LTR or UBIDI_DEFAULT_RTL. In that case, the level of the first paragraph is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606" title="UBiDiLevel is the type of the level values in this Bidi implementation.">UBiDiLevel</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a5cd3d78464b8e3b71886a643f70f25ab" title="Get a paragraph, given a position within the text.">ubidi_getParagraph</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a62377f811a750130246dfb49c1cc6dc0" title="Get a paragraph, given the index of this paragraph.">ubidi_getParagraphByIndex</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000420">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Referenced by <a class="el" href="ParagraphLayout_8h_source.html#l00638">ParagraphLayout::getParagraphLevel()</a>.</p>

</div>
</div>
<a class="anchor" id="abf3d2acd9d73fb4a3a25deb0ebca28d5"></a><!-- doxytag: member="ubidi.h::ubidi_getProcessedLength" ref="abf3d2acd9d73fb4a3a25deb0ebca28d5" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getProcessedLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the length of the source text processed by the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>. </p>
<p>This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream...">UBIDI_OPTION_STREAMING</a></code> has been set. <br/>
 Note that whenever the length of the text affects the execution or the result of a function, it is the processed length which must be considered, except for <code>ubidi_setPara</code> (which receives unprocessed source text) and <code>ubidi_getLength</code> (which returns the original length of the source text).<br/>
 In particular, the processed length is the one to consider in the following cases: </p>
<ul>
<li>
maximum value of the <code>limit</code> argument of <code>ubidi_setLine</code> </li>
<li>
maximum value of the <code>charIndex</code> argument of <code>ubidi_getParagraph</code> </li>
<li>
maximum value of the <code>charIndex</code> argument of <code>ubidi_getLevelAt</code> </li>
<li>
number of elements in the array returned by <code>ubidi_getLevels</code> </li>
<li>
maximum value of the <code>logicalStart</code> argument of <code>ubidi_getLogicalRun</code> </li>
<li>
maximum value of the <code>logicalIndex</code> argument of <code>ubidi_getVisualIndex</code> </li>
<li>
number of elements filled in the <code>*indexMap</code> argument of <code>ubidi_getLogicalMap</code> </li>
<li>
length of text processed by <code>ubidi_writeReordered</code> </li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the part of the source text processed by the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream...">UBIDI_OPTION_STREAMING</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000441">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a98a1b2869aab8c9dec5effa7749e0369"></a><!-- doxytag: member="ubidi.h::ubidi_getReorderingMode" ref="a98a1b2869aab8c9dec5effa7749e0369" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a> ubidi_getReorderingMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>What is the requested reordering mode for a given Bidi object? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current reordering mode of the Bidi object </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000411">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a5186ae76f6abfcbaf700d2dc7625516e"></a><!-- doxytag: member="ubidi.h::ubidi_getReorderingOptions" ref="a5186ae76f6abfcbaf700d2dc7625516e" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ubidi_getReorderingOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>What are the reordering options applied to a given Bidi object? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current reordering options of the Bidi object </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a25dd2aba9db100133217b9fe76de01de" title="Specify which of the reordering options should be applied during Bidi transformations...">ubidi_setReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000414">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a3247782277731ee82cfb3ba700f598a8"></a><!-- doxytag: member="ubidi.h::ubidi_getResultLength" ref="a3247782277731ee82cfb3ba700f598a8" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getResultLength </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the length of the reordered text resulting from the last call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>. </p>
<p>This length may be different from the length of the source text if option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code> or option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code> has been set. <br/>
 This resulting length is the one to consider in the following cases: </p>
<ul>
<li>
maximum value of the <code>visualIndex</code> argument of <code>ubidi_getLogicalIndex</code> </li>
<li>
number of elements of the <code>*indexMap</code> argument of <code>ubidi_getVisualMap</code> </li>
</ul>
<p>Note that this length stays identical to the source text length if Bidi marks are inserted or removed using option bits of <code>ubidi_writeReordered</code>, or if option <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> has been set.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the reordered text resulting from the last call to <code>ubidi_setPara</code>. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000442">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="afc55abde2c543bdd5f4031e75d38bb02"></a><!-- doxytag: member="ubidi.h::ubidi_getText" ref="afc55abde2c543bdd5f4031e75d38bb02" args="(const UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* ubidi_getText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the pointer to the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The pointer to the text that the UBiDi object was created for.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000418">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a17696c56f06e1a48270f0ff3b69edd79"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualIndex" ref="a17696c56f06e1a48270f0ff3b69edd79" args="(UBiDi *pBiDi, int32_t logicalIndex, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_getVisualIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>logicalIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the visual position from a logical text position. </p>
<p>If such a mapping is used many times on the same <code>UBiDi</code> object, then calling <code><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph...">ubidi_getLogicalMap()</a></code> is more efficient.</p>
<p>The value returned may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index...">UBIDI_MAP_NOWHERE</a></code> if there is no visual position because the corresponding text character is a Bidi control removed from output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the visual position returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>. </p>
<p>Note that in right-to-left runs, this mapping places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered()">UBIDI_KEEP_BASE_COMBINING</a></code> option can be considered instead of using the mapping, in order to avoid these issues.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>logicalIndex</em>&nbsp;</td><td>is the index of a character in the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The visual position of this character.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph...">ubidi_getLogicalMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position.">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000429">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af54771dbad2e4988fe9b00e55eede2e2"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualMap" ref="af54771dbad2e4988fe9b00e55eede2e2" args="(UBiDi *pBiDi, int32_t *indexMap, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_getVisualMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph or line) object. </p>
<p>Some values in the map may be <code><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index...">UBIDI_MAP_NOWHERE</a></code> if the corresponding text characters are Bidi marks inserted in the visual output by the option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>. </p>
<p>When the visual output is altered by using options of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> such as <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code>, <code>UBIDI_KEEP_BASE_COMBINING</code>, <code>UBIDI_OUTPUT_REVERSE</code>, <code>UBIDI_REMOVE_BIDI_CONTROLS</code>, the logical positions returned may not be correct. It is advised to use, when possible, reordering options such as <code>UBIDI_OPTION_INSERT_MARKS</code> and <code>UBIDI_OPTION_REMOVE_CONTROLS</code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code><a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara()...">ubidi_getResultLength()</a></code> indexes which will reflect the reordering of the characters. If option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code> is set, the number of elements allocated in <code>indexMap</code> must be no less than <code><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength()</a></code>. The array does not need to be initialized.<br/>
<br/>
 The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph...">ubidi_getLogicalMap</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a95ad84e638be70e73b23809fc132582f" title="Get the logical text position from a visual position.">ubidi_getLogicalIndex</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a3247782277731ee82cfb3ba700f598a8" title="Get the length of the reordered text resulting from the last call to ubidi_setPara()...">ubidi_getResultLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000432">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae923ec697e2eb77652fca9f1fcddc894"></a><!-- doxytag: member="ubidi.h::ubidi_getVisualRun" ref="ae923ec697e2eb77652fca9f1fcddc894" args="(UBiDi *pBiDi, int32_t runIndex, int32_t *pLogicalStart, int32_t *pLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102">UBiDiDirection</a> ubidi_getVisualRun </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>runIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pLogicalStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>pLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get one run's logical start, length, and directionality, which can be 0 for LTR or 1 for RTL. </p>
<p>In an RTL run, the character at the logical start is visually on the right of the displayed run. The length is the number of characters in the run.</p>
<p><code><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs.">ubidi_countRuns()</a></code> should be called before the runs are retrieved.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph or line <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>runIndex</em>&nbsp;</td><td>is the number of the run in visual order, in the range <code>[0..ubidi_countRuns(pBiDi)-1]</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLogicalStart</em>&nbsp;</td><td>is the first logical character index in the text. The pointer may be <code>NULL</code> if this index is not needed.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLength</em>&nbsp;</td><td>is the number of characters (at least one) in the run. The pointer may be <code>NULL</code> if this is not needed.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the directionality of the run, <code>UBIDI_LTR==0</code> or <code>UBIDI_RTL==1</code>, never <code>UBIDI_MIXED</code>.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs.">ubidi_countRuns</a></dd></dl>
<p>Example: </p>
<pre>
 <div class="fragment"><pre class="fragment"> int32_t i, count=<a class="code" href="ubidi_8h.html#a18c2f5cfaf8c8717759d6e0feaa58c99" title="Get the number of runs.">ubidi_countRuns</a>(pBiDi),
         logicalStart, visualIndex=0, length;
 <span class="keywordflow">for</span>(i=0; i&lt;count; ++i) {
    <span class="keywordflow">if</span>(<a class="code" href="ubidi_8h.html#a68a6b5fdcbf80aaa51b5bd39f7f31102a3378628e1b7851cd6d00e7f74d29f6c3" title="All left-to-right text.">UBIDI_LTR</a>==<a class="code" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&amp;#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun</a>(pBiDi, i, &amp;logicalStart, &amp;length)) {
         <span class="keywordflow">do</span> { <span class="comment">// LTR</span>
             show_char(text[logicalStart++], visualIndex++);
         } <span class="keywordflow">while</span>(--length&gt;0);
     } <span class="keywordflow">else</span> {
         logicalStart+=length;  <span class="comment">// logicalLimit</span>
         <span class="keywordflow">do</span> { <span class="comment">// RTL</span>
             show_char(text[--logicalStart], visualIndex++);
         } <span class="keywordflow">while</span>(--length&gt;0);
     }
 }
 *
</pre></div>
 </pre><p>Note that in right-to-left runs, code like this places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. </p>
<p>Use of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>, optionally with the <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered()">UBIDI_KEEP_BASE_COMBINING</a></code> option, can be considered in order to avoid these issues. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000428">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af5d1e5272fb2eec21e89a026fb665610"></a><!-- doxytag: member="ubidi.h::ubidi_invertMap" ref="af5d1e5272fb2eec21e89a026fb665610" args="(const int32_t *srcMap, int32_t *destMap, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_invertMap </td>
          <td>(</td>
          <td class="paramtype">const int32_t *&nbsp;</td>
          <td class="paramname"> <em>srcMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>destMap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Invert an index map. </p>
<p>The index mapping of the first map is inverted and written to the second one.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>srcMap</em>&nbsp;</td><td>is an array with <code>length</code> elements which defines the original mapping from a source array containing <code>length</code> elements to a destination array. Some elements of the source array may have no mapping in the destination array. In that case, their value will be the special value <code>UBIDI_MAP_NOWHERE</code>. All elements must be &gt;=0 or equal to <code>UBIDI_MAP_NOWHERE</code>. Some elements may have a value &gt;= <code>length</code>, if the destination array has more elements than the source array. There must be no duplicate indexes (two or more elements with the same value except <code>UBIDI_MAP_NOWHERE</code>).</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destMap</em>&nbsp;</td><td>is an array with a number of elements equal to 1 + the highest value in <code>srcMap</code>. <code>destMap</code> will be filled with the inverse mapping. If element with index i in <code>srcMap</code> has a value k different from <code>UBIDI_MAP_NOWHERE</code>, this means that element i of the source array maps to element k in the destination array. The inverse map will have value i in its k-th element. For all elements of the destination array which do not map to an element in the source array, the corresponding element in the inverse map will have a value equal to <code>UBIDI_MAP_NOWHERE</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the length of each array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a6bdc9eb61fd6146789e9827bdbded171" title="Special value which can be returned by the mapping functions when a logical index...">UBIDI_MAP_NOWHERE</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000435">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a794e61b06b5eedaeff7c7e72fa78a8ba"></a><!-- doxytag: member="ubidi.h::ubidi_isInverse" ref="a794e61b06b5eedaeff7c7e72fa78a8ba" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> ubidi_isInverse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this Bidi object set to perform the inverse Bidi algorithm? </p>
<p>Note: calling this function after setting the reordering mode with <code>ubidi_setReorderingMode</code> will return <code>TRUE</code> if the reordering mode was set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>, <code>FALSE</code> for all other values.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the Bidi object is set to perform the inverse Bidi algorithm by handling numbers as L.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000406">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a612d1977d09d1b30a8a41296a85ccba4"></a><!-- doxytag: member="ubidi.h::ubidi_isOrderParagraphsLTR" ref="a612d1977d09d1b30a8a41296a85ccba4" args="(UBiDi *pBiDi)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> ubidi_isOrderParagraphsLTR </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this Bidi object set to allocate level 0 to block separators so that successive paragraphs progress from left to right? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the Bidi object is set to allocate level 0 to block separators.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#ab7b9785b85169b3830034029729c672e" title="Specify whether block separators must be allocated level zero, so that successive...">ubidi_orderParagraphsLTR</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000408">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a4b0163f0f98e1c0f8915f1a26813c07f"></a><!-- doxytag: member="ubidi.h::ubidi_open" ref="a4b0163f0f98e1c0f8915f1a26813c07f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>* ubidi_open </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate a <code>UBiDi</code> structure. </p>
<p>Such an object is initially empty. It is assigned the Bidi properties of a piece of text containing one or more paragraphs by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or the Bidi properties of a line within a paragraph by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code>.</p>
<p>This object can be reused for as long as it is not deallocated by calling <code><a class="el" href="ubidi_8h.html#a3c30f10761d8cfb6974e3b7dc6c35df5" title="ubidi_close() must be called to free the memory associated with a UBiDi object.">ubidi_close()</a></code>.</p>
<p><code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> will allocate additional memory for internal structures as necessary.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An empty <code>UBiDi</code> object. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000402">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a3d75a7eb9ecf1d5280dc2807efd64716"></a><!-- doxytag: member="ubidi.h::ubidi_openSized" ref="a3d75a7eb9ecf1d5280dc2807efd64716" args="(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a>* ubidi_openSized </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>maxLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>maxRunCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate a <code>UBiDi</code> structure with preallocated memory for internal structures. </p>
<p>This function provides a <code>UBiDi</code> object like <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure.">ubidi_open()</a></code> with no arguments, but it also preallocates memory for internal structures according to the sizings supplied by the caller.</p>
<p>Subsequent functions will not allocate any more memory, and are thus guaranteed not to fail because of lack of memory.</p>
<p>The preallocation can be limited to some of the internal memory by setting some values to 0 here. That means that if, e.g., <code>maxRunCount</code> cannot be reasonably predetermined and should not be set to <code>maxLength</code> (the only failproof value) to avoid wasting memory, then <code>maxRunCount</code> could be set to 0 here and the internal structures that are associated with it will be allocated on demand, just like with <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure.">ubidi_open()</a></code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>maxLength</em>&nbsp;</td><td>is the maximum text or line length that internal memory will be preallocated for. An attempt to associate this object with a longer text will fail, unless this value is 0, which leaves the allocation up to the implementation.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>maxRunCount</em>&nbsp;</td><td>is the maximum anticipated number of same-level runs that internal memory will be preallocated for. An attempt to access visual runs on an object that was not preallocated for as many runs as the text was actually resolved to will fail, unless this value is 0, which leaves the allocation up to the implementation.<br/>
<br/>
 The number of runs depends on the actual text and maybe anywhere between 1 and <code>maxLength</code>. It is typically small.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An empty <code>UBiDi</code> object with preallocated memory. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000403">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab7b9785b85169b3830034029729c672e"></a><!-- doxytag: member="ubidi.h::ubidi_orderParagraphsLTR" ref="ab7b9785b85169b3830034029729c672e" args="(UBiDi *pBiDi, UBool orderParagraphsLTR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_orderParagraphsLTR </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</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>orderParagraphsLTR</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Specify whether block separators must be allocated level zero, so that successive paragraphs will progress from left to right. </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>. Paragraph separators (B) may appear in the text. Setting them to level zero means that all paragraph separators (including one possibly appearing in the last text position) are kept in the reordered text after the text that they follow in the source text. When this feature is not enabled, a paragraph separator at the last position of the text before reordering will go to the first position of the reordered text when the paragraph level is odd.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>orderParagraphsLTR</em>&nbsp;</td><td>specifies whether paragraph separators (B) must receive level 0, so that successive paragraphs progress from left to right.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000407">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a18113b39aa14585407c8f003c0f86d56"></a><!-- doxytag: member="ubidi.h::ubidi_reorderLogical" ref="a18113b39aa14585407c8f003c0f86d56" args="(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_reorderLogical </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>levels</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">int32_t *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This is a convenience function that does not use a UBiDi object. </p>
<p>It is intended to be used for when an application has determined the levels of objects (character sequences) and just needs to have them reordered (L2). This is equivalent to using <code><a class="el" href="ubidi_8h.html#a279cb5ce73e8ce2f820fd3c1fb8bb15c" title="Get a logical-to-visual index map (array) for the characters in the UBiDi (paragraph...">ubidi_getLogicalMap()</a></code> on a <code>UBiDi</code> object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>levels</em>&nbsp;</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the number of levels in the array, or, semantically, the number of objects to be reordered. It must be <code>length&gt;0</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code>length</code> indexes which will reflect the reordering of the characters. The array does not need to be initialized.</td></tr>
  </table>
  </dd>
</dl>
<p>The index map will result in <code>indexMap[logicalIndex]==visualIndex</code>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000433">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a01009fa9de9e31b124d5e8bdc2cf2a3e"></a><!-- doxytag: member="ubidi.h::ubidi_reorderVisual" ref="a01009fa9de9e31b124d5e8bdc2cf2a3e" args="(const UBiDiLevel *levels, int32_t length, int32_t *indexMap)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_reorderVisual </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>levels</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">int32_t *&nbsp;</td>
          <td class="paramname"> <em>indexMap</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This is a convenience function that does not use a UBiDi object. </p>
<p>It is intended to be used for when an application has determined the levels of objects (character sequences) and just needs to have them reordered (L2). This is equivalent to using <code><a class="el" href="ubidi_8h.html#af54771dbad2e4988fe9b00e55eede2e2" title="Get a visual-to-logical index map (array) for the characters in the UBiDi (paragraph...">ubidi_getVisualMap()</a></code> on a <code>UBiDi</code> object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>levels</em>&nbsp;</td><td>is an array with <code>length</code> levels that have been determined by the application.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the number of levels in the array, or, semantically, the number of objects to be reordered. It must be <code>length&gt;0</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>indexMap</em>&nbsp;</td><td>is a pointer to an array of <code>length</code> indexes which will reflect the reordering of the characters. The array does not need to be initialized.</td></tr>
  </table>
  </dd>
</dl>
<p>The index map will result in <code>indexMap[visualIndex]==logicalIndex</code>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000434">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a4acd99089d2c4f31495210a5462bcb21"></a><!-- doxytag: member="ubidi.h::ubidi_setClassCallback" ref="a4acd99089d2c4f31495210a5462bcb21" args="(UBiDi *pBiDi, UBiDiClassCallback *newFn, const void *newContext, UBiDiClassCallback **oldFn, const void **oldContext, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setClassCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> *&nbsp;</td>
          <td class="paramname"> <em>newFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>newContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a77893628988f90ea58198aaac9c6fcea">UBiDiClassCallback</a> **&nbsp;</td>
          <td class="paramname"> <em>oldFn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **&nbsp;</td>
          <td class="paramname"> <em>oldContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the callback function and callback data used by the UBA implementation for Bidi class determination. </p>
<p>This may be useful for assigning Bidi classes to PUA characters, or for special application needs. For instance, an application may want to handle all spaces like L or R characters (according to the base direction) when creating the visual ordering of logical lines which are part of a report organized in columns: there should not be interaction between adjacent cells.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is the paragraph <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newFn</em>&nbsp;</td><td>is the new callback function pointer.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newContext</em>&nbsp;</td><td>is the new callback context pointer. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>oldFn</em>&nbsp;</td><td>fillin: Returns the old callback function pointer. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>oldContext</em>&nbsp;</td><td>fillin: Returns the old callback's context. This can be NULL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a0cafa2a8c29c03918c3a2cdf4ccea778" title="Get the current callback function used for Bidi class determination.">ubidi_getClassCallback</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000446">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a836b2eaf83ca712cf28e69cd4ba934f4"></a><!-- doxytag: member="ubidi.h::ubidi_setInverse" ref="a836b2eaf83ca712cf28e69cd4ba934f4" args="(UBiDi *pBiDi, UBool isInverse)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setInverse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</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>isInverse</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modify the operation of the Bidi algorithm such that it approximates an "inverse Bidi" algorithm. </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>.</p>
<p>The normal operation of the Bidi algorithm as described in the Unicode Technical Report is to take text stored in logical (keyboard, typing) order and to determine the reordering of it for visual rendering. Some legacy systems store text in visual order, and for operations with standard, Unicode-based algorithms, the text needs to be transformed to logical order. This is effectively the inverse algorithm of the described Bidi algorithm. Note that there is no standard algorithm for this "inverse Bidi" and that the current implementation provides only an approximation of "inverse Bidi".</p>
<p>With <code>isInverse</code> set to <code>TRUE</code>, this function changes the behavior of some of the subsequent functions in a way that they can be used for the inverse Bidi algorithm. Specifically, runs of text with numeric characters will be treated in a special way and may need to be surrounded with LRM characters when they are written in reordered sequence.</p>
<p>Output runs should be retrieved using <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun()</a></code>. Since the actual input for "inverse Bidi" is visually ordered text and <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun()</a></code> gets the reordered runs, these are actually the runs of the logically ordered output.</p>
<p>Calling this function with argument <code>isInverse</code> set to <code>TRUE</code> is equivalent to calling <code>ubidi_setReorderingMode</code> with argument <code>reorderingMode</code> set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>.<br/>
 Calling this function with argument <code>isInverse</code> set to <code>FALSE</code> is equivalent to calling <code>ubidi_setReorderingMode</code> with argument <code>reorderingMode</code> set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode.">UBIDI_REORDER_DEFAULT</a></code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isInverse</em>&nbsp;</td><td>specifies "forward" or "inverse" Bidi operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#afe123acc1196c4d7363f968ca6af6faa" title="Modify the operation of the Bidi algorithm such that it implements some variant to...">ubidi_setReorderingMode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000405">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ac7d96b281cd6ab2d56900bfdc37c808a"></a><!-- doxytag: member="ubidi.h::ubidi_setLine" ref="ac7d96b281cd6ab2d56900bfdc37c808a" args="(const UBiDi *pParaBiDi, int32_t start, int32_t limit, UBiDi *pLineBiDi, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pParaBiDi</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>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pLineBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> sets a <code>UBiDi</code> to contain the reordering information, especially the resolved levels, for all the characters in a line of text. </p>
<p>This line of text is specified by referring to a <code>UBiDi</code> object representing this information for a piece of text containing one or more paragraphs, and by specifying a range of indexes in this text.</p>
<p>In the new line object, the indexes will range from 0 to <code>limit-start-1</code>.</p>
<p>This is used after calling <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> for a piece of text, and after line-breaking on that text. It is not necessary if each paragraph is treated as a single line.</p>
<p>After line-breaking, rules (L1) and (L2) for the treatment of trailing WS and for reordering are performed on a <code>UBiDi</code> object that represents a line.</p>
<p><b>Important: </b><code>pLineBiDi</code> shares data with <code>pParaBiDi</code>. You must destroy or reuse <code>pLineBiDi</code> before <code>pParaBiDi</code>. In other words, you must destroy or reuse the <code>UBiDi</code> object for a line before the object for its parent paragraph.</p>
<p>The text pointer that was stored in <code>pParaBiDi</code> is also copied, and <code>start</code> is added to it so that it points to the beginning of the line for this object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pParaBiDi</em>&nbsp;</td><td>is the parent paragraph object. It must have been set by a successful call to ubidi_setPara.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>is the line's first index into the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</td><td>is just behind the line's last index into the text (its last index +1).<br/>
 It must be <code>0&lt;=start&lt;limit&lt;=</code>containing paragraph limit. If the specified line crosses a paragraph boundary, the function will terminate with error code U_ILLEGAL_ARGUMENT_ERROR.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pLineBiDi</em>&nbsp;</td><td>is the object that will now represent a line of the text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000416">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="abdfe9e113a19dd8521d3b7ac8220fe11"></a><!-- doxytag: member="ubidi.h::ubidi_setPara" ref="abdfe9e113a19dd8521d3b7ac8220fe11" args="(UBiDi *pBiDi, const UChar *text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel *embeddingLevels, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setPara </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>text</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="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a>&nbsp;</td>
          <td class="paramname"> <em>paraLevel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#ab2460a19f323ab9787a79a95db91a606">UBiDiLevel</a> *&nbsp;</td>
          <td class="paramname"> <em>embeddingLevels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Perform the Unicode Bidi algorithm. </p>
<p>It is defined in the <a href="http://www.unicode.org/unicode/reports/tr9/">Unicode Standard Anned #9</a>, version 13, also described in The Unicode Standard, Version 4.0 .</p>
<p>This function takes a piece of plain text containing one or more paragraphs, with or without externally specified embedding levels from <em>styled</em> text and computes the left-right-directionality of each character.</p>
<p>If the entire text is all of the same directionality, then the function may not perform all the steps described by the algorithm, i.e., some levels may not be the same as if all steps were performed. This is not relevant for unidirectional text.<br/>
 For example, in pure LTR text with numbers the numbers would get a resolved level of 2 higher than the surrounding text according to the algorithm. This implementation may set all resolved levels to the same value in such a case.</p>
<p>The text can be composed of multiple paragraphs. Occurrence of a block separator in the text terminates a paragraph, and whatever comes next starts a new paragraph. The exception to this rule is when a Carriage Return (CR) is followed by a Line Feed (LF). Both CR and LF are block separators, but in that case, the pair of characters is considered as terminating the preceding paragraph, and a new paragraph will be started by a character coming after the LF.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>A <code>UBiDi</code> object allocated with <code><a class="el" href="ubidi_8h.html#a4b0163f0f98e1c0f8915f1a26813c07f" title="Allocate a UBiDi structure.">ubidi_open()</a></code> which will be set to contain the reordering information, especially the resolved levels for all the characters in <code>text</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>is a pointer to the text that the Bidi algorithm will be performed on. This pointer is stored in the UBiDi object and can be retrieved with <code><a class="el" href="ubidi_8h.html#afc55abde2c543bdd5f4031e75d38bb02" title="Get the pointer to the text.">ubidi_getText()</a></code>.<br/>
 <b>Note:</b> the text must be (at least) <code>length</code> long.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>is the length of the text; if <code>length==-1</code> then the text must be zero-terminated.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>paraLevel</em>&nbsp;</td><td>specifies the default level for the text; it is typically 0 (LTR) or 1 (RTL). If the function shall determine the paragraph level from the text, then <code>paraLevel</code> can be set to either <code><a class="el" href="ubidi_8h.html#a165ae276878c7a54fd8b067db0d12f40" title="Paragraph level setting.">UBIDI_DEFAULT_LTR</a></code> or <code><a class="el" href="ubidi_8h.html#a0b4d6ac752ab7a8a33eb825e9c76683d" title="Paragraph level setting.">UBIDI_DEFAULT_RTL</a></code>; if the text contains multiple paragraphs, the paragraph level shall be determined separately for each paragraph; if a paragraph does not include any strongly typed character, then the desired default is used (0 for LTR or 1 for RTL). Any other value between 0 and <code><a class="el" href="ubidi_8h.html#a531b2d2bfa7655df6bf86d1236a1928a" title="Maximum explicit embedding level.">UBIDI_MAX_EXPLICIT_LEVEL</a></code> is also valid, with odd levels indicating RTL.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>embeddingLevels</em>&nbsp;</td><td>(in) may be used to preset the embedding and override levels, ignoring characters like LRE and PDF in the text. A level overrides the directional property of its corresponding (same index) character if the level has the <code><a class="el" href="ubidi_8h.html#a5e4049fa946dd8e0a1b3c01e5c1c3711" title="Bit flag for level input.">UBIDI_LEVEL_OVERRIDE</a></code> bit set.<br/>
<br/>
 Except for that bit, it must be <code>paraLevel&lt;=embeddingLevels[]&lt;=UBIDI_MAX_EXPLICIT_LEVEL</code>, with one exception: a level of zero may be specified for a paragraph separator even if <code>paraLevel&gt;0</code> when multiple paragraphs are submitted in the same call to <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>.<br/>
<br/>
 <b>Caution: </b>A copy of this pointer, not of the levels, will be stored in the <code>UBiDi</code> object; the <code>embeddingLevels</code> array must not be deallocated before the <code>UBiDi</code> structure is destroyed or reused, and the <code>embeddingLevels</code> should not be modified to avoid unexpected results on subsequent Bidi operations. However, the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> and <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> functions may modify some or all of the levels.<br/>
<br/>
 After the <code>UBiDi</code> object is reused or destroyed, the caller must take care of the deallocation of the <code>embeddingLevels</code> array.<br/>
<br/>
 <b>Note:</b> the <code>embeddingLevels</code> array must be at least <code>length</code> long. This pointer can be <code>NULL</code> if this value is not necessary.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000415">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="afe123acc1196c4d7363f968ca6af6faa"></a><!-- doxytag: member="ubidi.h::ubidi_setReorderingMode" ref="afe123acc1196c4d7363f968ca6af6faa" args="(UBiDi *pBiDi, UBiDiReorderingMode reorderingMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setReorderingMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df">UBiDiReorderingMode</a>&nbsp;</td>
          <td class="paramname"> <em>reorderingMode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modify the operation of the Bidi algorithm such that it implements some variant to the basic Bidi algorithm or approximates an "inverse Bidi" algorithm, depending on different values of the "reordering mode". </p>
<p>This function must be called before <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code>, and stays in effect until called again with a different argument.</p>
<p>The normal operation of the Bidi algorithm as described in the Unicode Standard Annex #9 is to take text stored in logical (keyboard, typing) order and to determine how to reorder it for visual rendering.</p>
<p>With the reordering mode set to a value other than <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode.">UBIDI_REORDER_DEFAULT</a></code>, this function changes the behavior of some of the subsequent functions in a way such that they implement an inverse Bidi algorithm or some other algorithm variants.</p>
<p>Some legacy systems store text in visual order, and for operations with standard, Unicode-based algorithms, the text needs to be transformed into logical order. This is effectively the inverse algorithm of the described Bidi algorithm. Note that there is no standard algorithm for this "inverse Bidi", so a number of variants are implemented here.</p>
<p>In other cases, it may be desirable to emulate some variant of the Logical to Visual algorithm (e.g. one used in MS Windows), or perform a Logical to Logical transformation.</p>
<ul>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfac366446a9080bf062aca0080e9effc5b" title="Regular Logical to Visual Bidi algorithm according to Unicode.">UBIDI_REORDER_DEFAULT</a></code>, the standard Bidi Logical to Visual algorithm is applied.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa447996fecd0eefb0d12ce247cb511e5f" title="Logical to Visual algorithm which handles numbers in a way which mimicks the behavior...">UBIDI_REORDER_NUMBERS_SPECIAL</a></code>, the algorithm used to perform Bidi transformations when calling <code>ubidi_setPara</code> should approximate the algorithm used in Microsoft Windows XP rather than strictly conform to the Unicode Bidi algorithm. <br/>
 The differences between the basic algorithm and the algorithm addressed by this option are as follows: </p>
<ul>
<li>
Within text at an even embedding level, the sequence "123AB" (where AB represent R or AL letters) is transformed to "123BA" by the Unicode algorithm and to "BA123" by the Windows algorithm. </li>
<li>
Arabic-Indic numbers (AN) are handled by the Windows algorithm just like regular numbers (EN). </li>
</ul>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0cd75b3d1d8abc971554a2a7d459c6d7" title="Logical to Visual algorithm grouping numbers with adjacent R characters (reversible...">UBIDI_REORDER_GROUP_NUMBERS_WITH_R</a></code>, numbers located between LTR text and RTL text are associated with the RTL text. For instance, an LTR paragraph with content "abc 123 DEF" (where upper case letters represent RTL characters) will be transformed to "abc FED 123" (and not "abc 123 FED"), "DEF 123 abc" will be transformed to "123 FED abc" and "123 FED abc" will be transformed to "DEF 123 abc". This makes the algorithm reversible and makes it useful when round trip (from visual to logical and back to visual) must be achieved without adding LRM characters. However, this is a variation from the standard Unicode Bidi algorithm.<br/>
 The source text should not contain Bidi control characters other than LRM or RLM.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa103b373c5933dd91cbfb2382b77bde8d" title="Reorder runs only to transform a Logical LTR string to the Logical RTL string with...">UBIDI_REORDER_RUNS_ONLY</a></code>, a "Logical to Logical" transformation must be performed: </p>
<ul>
<li>
If the default text level of the source text (argument <code>paraLevel</code> in <code>ubidi_setPara</code>) is even, the source text will be handled as LTR logical text and will be transformed to the RTL logical text which has the same LTR visual display. </li>
<li>
If the default level of the source text is odd, the source text will be handled as RTL logical text and will be transformed to the LTR logical text which has the same LTR visual display. </li>
</ul>
<p>This mode may be needed when logical text which is basically Arabic or Hebrew, with possible included numbers or phrases in English, has to be displayed as if it had an even embedding level (this can happen if the displaying application treats all text as if it was basically LTR). <br/>
 This mode may also be needed in the reverse case, when logical text which is basically English, with possible included phrases in Arabic or Hebrew, has to be displayed as if it had an odd embedding level. <br/>
 Both cases could be handled by adding LRE or RLE at the head of the text, if the display subsystem supports these formatting controls. If it does not, the problem may be handled by transforming the source text in this mode before displaying it, so that it will be displayed properly.<br/>
 The source text should not contain Bidi control characters other than LRM or RLM.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code>, an "inverse Bidi" algorithm is applied. Runs of text with numeric characters will be treated like LTR letters and may need to be surrounded with LRM characters when they are written in reordered sequence (the option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> can be used with function <code>ubidi_writeReordered</code> to this end. This mode is equivalent to calling <code><a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse...">ubidi_setInverse()</a></code> with argument <code>isInverse</code> set to <code>TRUE</code>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa8ca4fe9b9d87e67c37c8a80bed3147aa" title="Visual to Logical algorithm equivalent to the regular Logical to Visual algorithm...">UBIDI_REORDER_INVERSE_LIKE_DIRECT</a></code>, the "direct" Logical to Visual Bidi algorithm is used as an approximation of an "inverse Bidi" algorithm. This mode is similar to mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> but is closer to the regular Bidi algorithm. <br/>
 For example, an LTR paragraph with the content "FED 123 456 CBA" (where upper case represents RTL characters) will be transformed to "ABC 456 123 DEF", as opposed to "DEF 123 456 ABC" with mode <code>UBIDI_REORDER_INVERSE_NUMBERS_AS_L</code>.<br/>
 When used in conjunction with option <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>, this mode generally adds Bidi marks to the output significantly more sparingly than mode <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa6d23bae87c6e629866a3b87e11250e9a" title="Visual to Logical algorithm which handles numbers like L (same algorithm as selected...">UBIDI_REORDER_INVERSE_NUMBERS_AS_L</a></code> with option <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code> in calls to <code>ubidi_writeReordered</code>.</p>
<p class="endli"></p>
</li>
<li>
When the reordering mode is set to <code><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56dfa0c426985f03689d0c4a2aade0e48c69e" title="Inverse Bidi (Visual to Logical) algorithm for the UBIDI_REORDER_NUMBERS_SPECIAL...">UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL</a></code>, the Logical to Visual Bidi algorithm used in Windows XP is used as an approximation of an "inverse Bidi" algorithm. <br/>
 For example, an LTR paragraph with the content "abc FED123" (where upper case represents RTL characters) will be transformed to "abc 123DEF." </li>
</ul>
<p>In all the reordering modes specifying an "inverse Bidi" algorithm (i.e. those with a name starting with <code>UBIDI_REORDER_INVERSE</code>), output runs should be retrieved using <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun()</a></code>, and the output text with <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>. The caller should keep in mind that in "inverse Bidi" modes the input is actually visually ordered text and reordered output returned by <code><a class="el" href="ubidi_8h.html#ae923ec697e2eb77652fca9f1fcddc894" title="Get one run&#39;s logical start, length, and directionality, which can be 0 for LTR...">ubidi_getVisualRun()</a></code> or <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code> are actually runs or character string of logically ordered output.<br/>
 For all the "inverse Bidi" modes, the source text should not contain Bidi control characters other than LRM or RLM.</p>
<p>Note that option <code><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3" title="option bit for ubidi_writeReordered(): write the output in reverse order">UBIDI_OUTPUT_REVERSE</a></code> of <code>ubidi_writeReordered</code> has no useful meaning and should not be used in conjunction with any value of the reordering mode specifying "inverse Bidi" or with value <code>UBIDI_REORDER_RUNS_ONLY</code>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reorderingMode</em>&nbsp;</td><td>specifies the required variant of the Bidi algorithm.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a88693e5a8ad4be974dc90ec6b8db56df" title="UBiDiReorderingMode values indicate which variant of the Bidi algorithm to use.">UBiDiReorderingMode</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a836b2eaf83ca712cf28e69cd4ba934f4" title="Modify the operation of the Bidi algorithm such that it approximates an &quot;inverse...">ubidi_setInverse</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara</a> </dd>
<dd>
<a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000410">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a25dd2aba9db100133217b9fe76de01de"></a><!-- doxytag: member="ubidi.h::ubidi_setReorderingOptions" ref="a25dd2aba9db100133217b9fe76de01de" args="(UBiDi *pBiDi, uint32_t reorderingOptions)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ubidi_setReorderingOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>reorderingOptions</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Specify which of the reordering options should be applied during Bidi transformations. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>is a <code>UBiDi</code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reorderingOptions</em>&nbsp;</td><td>is a combination of zero or more of the following options: <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386ae3c7e82fa51ecfccacb2d85fb6dc60fb" title="option value for ubidi_setReorderingOptions: disable all the options which can be...">UBIDI_OPTION_DEFAULT</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386a23405ee9a1f1b254cc692132712ef9a6" title="option bit for ubidi_setReorderingOptions: insert Bidi marks (LRM or RLM) when needed...">UBIDI_OPTION_INSERT_MARKS</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aeeff5ec55e7544a4ee713c53715fc502" title="option bit for ubidi_setReorderingOptions: remove Bidi control characters">UBIDI_OPTION_REMOVE_CONTROLS</a></code>, <code><a class="el" href="ubidi_8h.html#a4505e4adc8da792501414b770f49f386aa2760cf6aad6086eeca7a022ad9c59d7" title="option bit for ubidi_setReorderingOptions: process the output as part of a stream...">UBIDI_OPTION_STREAMING</a></code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a5186ae76f6abfcbaf700d2dc7625516e" title="What are the reordering options applied to a given Bidi object?">ubidi_getReorderingOptions</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000413">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a26790ff71c59f223ded4047da5626725"></a><!-- doxytag: member="ubidi.h::ubidi_writeReordered" ref="a26790ff71c59f223ded4047da5626725" args="(UBiDi *pBiDi, UChar *dest, int32_t destSize, uint16_t options, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_writeReordered </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ubidi_8h.html#aeed24292bbed966df93f088bc6791f74">UBiDi</a> *&nbsp;</td>
          <td class="paramname"> <em>pBiDi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Take a <code>UBiDi</code> object containing the reordering information for a piece of text (one or more paragraphs) set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or for a line of text set by <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> and write a reordered string to the destination buffer. </p>
<p>This function preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters in RTL runs can be replaced by mirror-image characters in the destination buffer. Note that "real" mirroring has to be done in a rendering engine by glyph selection and that for many "mirrored" characters there are no Unicode characters as mirror-image equivalents. There are also options to insert or remove Bidi control characters; see the description of the <code>destSize</code> and <code>options</code> parameters and of the option bit flags.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pBiDi</em>&nbsp;</td><td>A pointer to a <code>UBiDi</code> object that is set by <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> or <code><a class="el" href="ubidi_8h.html#ac7d96b281cd6ab2d56900bfdc37c808a" title="ubidi_setLine() sets a UBiDi to contain the reordering information, especially the...">ubidi_setLine()</a></code> and contains the reordering information for the text that it was defined for, as well as a pointer to that text.<br/>
<br/>
 The text was aliased (only the pointer was stored without copying the contents) and must not have been modified since the <code><a class="el" href="ubidi_8h.html#abdfe9e113a19dd8521d3b7ac8220fe11" title="Perform the Unicode Bidi algorithm.">ubidi_setPara()</a></code> call.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>A pointer to where the reordered text is to be copied. The source text and <code>dest[destSize]</code> must not overlap.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destSize</em>&nbsp;</td><td>The size of the <code>dest</code> buffer, in number of UChars. If the <code>UBIDI_INSERT_LRM_FOR_NUMERIC</code> option is set, then the destination length could be as large as <code>ubidi_getLength(pBiDi)+2*ubidi_countRuns(pBiDi)</code>. If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option is set, then the destination length may be less than <code>ubidi_getLength(pBiDi)</code>. If none of these options is set, then the destination length will be exactly <code>ubidi_getProcessedLength(pBiDi)</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options for the reordering that control how the reordered text is written. The options include mirroring the characters on a code point basis and inserting LRM characters, which is used especially for transforming visually stored text to logically stored text (although this is still an imperfect implementation of an "inverse Bidi" algorithm because it uses the "forward Bidi" algorithm at its core). The available options are: <code><a class="el" href="ubidi_8h.html#a0b1370dda1e3ad8ef9c94fd28320153d" title="option bit for ubidi_writeReordered(): replace characters with the &quot;mirrored&quot;...">UBIDI_DO_MIRRORING</a></code>, <code><a class="el" href="ubidi_8h.html#adad66f9132bc4e4621427091acfc0f40" title="option bit for ubidi_writeReordered(): surround the run with LRMs if necessary; this...">UBIDI_INSERT_LRM_FOR_NUMERIC</a></code>, <code><a class="el" href="ubidi_8h.html#a2e022ccd0d2c55a21c2aa233c30ecd88" title="option flags for ubidi_writeReordered()">UBIDI_KEEP_BASE_COMBINING</a></code>, <code><a class="el" href="ubidi_8h.html#a4a10c3aac68ceca1569bac717156cef3" title="option bit for ubidi_writeReordered(): write the output in reverse order">UBIDI_OUTPUT_REVERSE</a></code>, <code><a class="el" href="ubidi_8h.html#a039000c1e298cbad5909d07a55ca5312" title="option bit for ubidi_writeReordered(): remove Bidi control characters (this does...">UBIDI_REMOVE_BIDI_CONTROLS</a></code></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the output string.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#abf3d2acd9d73fb4a3a25deb0ebca28d5" title="Get the length of the source text processed by the last call to ubidi_setPara().">ubidi_getProcessedLength</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000448">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a2b0dd2bc3a984509545449d76cb1ed2e"></a><!-- doxytag: member="ubidi.h::ubidi_writeReverse" ref="a2b0dd2bc3a984509545449d76cb1ed2e" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destSize, uint16_t options, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ubidi_writeReverse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reverse a Right-To-Left run of Unicode text. </p>
<p>This function preserves the integrity of characters with multiple code units and (optionally) combining characters. Characters can be replaced by mirror-image characters in the destination buffer. Note that "real" mirroring has to be done in a rendering engine by glyph selection and that for many "mirrored" characters there are no Unicode characters as mirror-image equivalents. There are also options to insert or remove Bidi control characters.</p>
<p>This function is the implementation for reversing RTL runs as part of <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>. For detailed descriptions of the parameters, see there. Since no Bidi controls are inserted here, the output string length will never exceed <code>srcLength</code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered</a></dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>A pointer to the RTL run text.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>The length of the RTL run.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>A pointer to where the reordered text is to be copied. <code>src[srcLength]</code> and <code>dest[destSize]</code> must not overlap.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destSize</em>&nbsp;</td><td>The size of the <code>dest</code> buffer, in number of UChars. If the <code>UBIDI_REMOVE_BIDI_CONTROLS</code> option is set, then the destination length may be less than <code>srcLength</code>. If this option is not set, then the destination length will be exactly <code>srcLength</code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options for the reordering that control how the reordered text is written. See the <code>options</code> parameter in <code><a class="el" href="ubidi_8h.html#a26790ff71c59f223ded4047da5626725" title="Take a UBiDi object containing the reordering information for a piece of text (one...">ubidi_writeReordered()</a></code>.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>must be a valid pointer to an error code value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the output string. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000449">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</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>