12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <chapter xml:id="unicode.h">
- <title><tt>__vic/unicode.h</tt></title>
- <p><link href="https://www.unicode.org/">Unicode</link> support utilities.</p>
- <chapter xml:id="unicode_t">
- <title><tt>unicode_t</tt></title>
- <code-block lang="C++">
- using unicode_t = char32_t; // since C++11
- // or
- using unicode_t = uint_least32_t; // C++98
- </code-block>
- <p>Type able to store any Unicode
- <link href="https://www.unicode.org/glossary/#code_point">code point</link>.</p>
- </chapter>
- <chapter xml:id="utf_transcode">
- <title><tt>utf_transcode()</tt></title>
- <code-block lang="C++"><![CDATA[
- template<class UTFReader, class UTFWriter>
- void utf_transcode(UTFReader r, UTFWriter w);
- ]]></code-block>
- <p>An algorithm that reads all code points of type <xref to="unicode_t"/> from
- <tt>UTFReader</tt> using <tt>r.read()</tt> and writes them to <tt>UTFWriter</tt>
- using <tt>w.write()</tt>.</p>
- </chapter>
- <chapter xml:id="unicode_code_point_constants">
- <title><tt>Code point constants</tt></title>
- <code-block lang="C++">
- constexpr unicode_t unicode_max = 0x10FFFF;
- constexpr unicode_t unicode_bom = 0xFEFF;
- constexpr unicode_t unicode_replacement_char = 0xFFFD;
- </code-block>
- <p>Named constants for some useful Unicode code points.</p>
- </chapter>
- </chapter>
|