summaryrefslogtreecommitdiffstats
path: root/unicode/book.xml
diff options
context:
space:
mode:
authorSam Varshavchik2020-12-06 20:29:07 -0500
committerSam Varshavchik2020-12-06 20:29:07 -0500
commit3a5d23502f3c34e1047fd93d02a777eda6a32a41 (patch)
treed4b8de6001f5d9725be90a2236e011d473b1d4a2 /unicode/book.xml
parentdba04f8c6b41ff124485d620781c651ce1352ee4 (diff)
downloadcourier-libs-3a5d23502f3c34e1047fd93d02a777eda6a32a41.tar.bz2
courier-unicode: partial cleanup of bidirectional strings.
Diffstat (limited to 'unicode/book.xml')
-rw-r--r--unicode/book.xml32
1 files changed, 31 insertions, 1 deletions
diff --git a/unicode/book.xml b/unicode/book.xml
index 4838364..45686dc 100644
--- a/unicode/book.xml
+++ b/unicode/book.xml
@@ -2851,7 +2851,7 @@ See COPYING for distribution information.
<funcprototype>
<funcdef>void <function>unicode::bidi_cleanup</function></funcdef>
<paramdef>std::u32string &amp;<parameter>string</parameter></paramdef>
- <paramdef>const std::function&lt;void (size_t) noexcept&gt; &amp;<parameter>removed_callback</parameter></paramdef>
+ <paramdef>const std::function&lt;void (size_t) noexcept&gt; &amp;<parameter>removed_callback</parameter>=[](size_t){}</paramdef>
<paramdef>int <parameter>cleanup_options</parameter></paramdef>
</funcprototype>
@@ -2859,8 +2859,18 @@ See COPYING for distribution information.
<funcdef>int <function>unicode::bidi_cleanup</function></funcdef>
<paramdef>std::u32string &amp;<parameter>string</parameter></paramdef>
<paramdef>std::vector &lt;unicode_bidi_level_t&gt; &amp;<parameter>levels</parameter></paramdef>
+ <paramdef>const std::function&lt;void (size_t) noexcept&gt; &amp;<parameter>removed_callback</parameter>=[](size_t){}</paramdef>
+ <paramdef>int <parameter>cleanup_options</parameter>=0</paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>unicode::bidi_cleanup</function></funcdef>
+ <paramdef>std::u32string &amp;<parameter>string</parameter></paramdef>
+ <paramdef>std::vector &lt;unicode_bidi_level_t&gt; &amp;<parameter>levels</parameter></paramdef>
<paramdef>const std::function&lt;void (size_t) noexcept&gt; &amp;<parameter>removed_callback</parameter></paramdef>
<paramdef>int <parameter>cleanup_options</parameter></paramdef>
+ <paramdef>size_t <parameter>starting_pos</parameter></paramdef>
+ <paramdef>size_t <parameter>n</parameter></paramdef>
</funcprototype>
<funcprototype>
@@ -3030,6 +3040,26 @@ auto [levels, level]=unicode::bidi_calc(types);
characters).
</para>
</listitem>
+
+ <listitem>
+ <para>
+ <function>unicode::bidi_reorder</function> and
+ <function>unicode::bidi_cleanup</function> take two optional
+ parameters (defaulted values or overloaded) specifying
+ an optional starting position and number of characters that
+ define a subset of the original string that gets reordered
+ or cleaned up.
+ </para>
+
+ <para>
+ This <function>unicode::bidi_cleanup</function> does not
+ trim off the passed in string and embedding level buffer,
+ since it affects only a subset of the string. The number
+ of times the removed character callback gets invoked
+ indicates how much the substring should be trimmed off.
+ </para>
+ </listitem>
+
</itemizedlist>
<refsect2 id="unicode_cpp_bidi_literals">