581 lines
26 KiB
HTML
581 lines
26 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>libctru: include/3ds/util/utf.h File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">libctru
|
|
 <span id="projectnumber">v2.4.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d475325f6a9fe3bfc3a495c72a9e475e.html">3ds</a></li><li class="navelem"><a class="el" href="dir_1b1aef9f2527d990c50369cf62d7d9a1.html">util</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">utf.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>UTF conversion functions.
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include <stdint.h></code><br />
|
|
<code>#include <sys/types.h></code><br />
|
|
</div>
|
|
<p><a href="utf_8h_source.html">Go to the source code of this file.</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:aace78933e35ab187df3ad6bd5a2a6383"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#aace78933e35ab187df3ad6bd5a2a6383">decode_utf8</a> (uint32_t *out, const uint8_t *in)</td></tr>
|
|
<tr class="memdesc:aace78933e35ab187df3ad6bd5a2a6383"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-8 sequence into a UTF-32 codepoint. <a href="utf_8h.html#aace78933e35ab187df3ad6bd5a2a6383">More...</a><br /></td></tr>
|
|
<tr class="separator:aace78933e35ab187df3ad6bd5a2a6383"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aab93c2be8e27403ee787ec299bf2bb0d"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#aab93c2be8e27403ee787ec299bf2bb0d">decode_utf16</a> (uint32_t *out, const uint16_t *in)</td></tr>
|
|
<tr class="memdesc:aab93c2be8e27403ee787ec299bf2bb0d"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-16 sequence into a UTF-32 codepoint. <a href="utf_8h.html#aab93c2be8e27403ee787ec299bf2bb0d">More...</a><br /></td></tr>
|
|
<tr class="separator:aab93c2be8e27403ee787ec299bf2bb0d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af8127b9052fc5671da5589a486bd90c7"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#af8127b9052fc5671da5589a486bd90c7">encode_utf8</a> (uint8_t *out, uint32_t in)</td></tr>
|
|
<tr class="memdesc:af8127b9052fc5671da5589a486bd90c7"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-32 codepoint into a UTF-8 sequence. <a href="utf_8h.html#af8127b9052fc5671da5589a486bd90c7">More...</a><br /></td></tr>
|
|
<tr class="separator:af8127b9052fc5671da5589a486bd90c7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a39a8de618e547cfb59367bc254a7a4d8"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a39a8de618e547cfb59367bc254a7a4d8">encode_utf16</a> (uint16_t *out, uint32_t in)</td></tr>
|
|
<tr class="memdesc:a39a8de618e547cfb59367bc254a7a4d8"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-32 codepoint into a UTF-16 sequence. <a href="utf_8h.html#a39a8de618e547cfb59367bc254a7a4d8">More...</a><br /></td></tr>
|
|
<tr class="separator:a39a8de618e547cfb59367bc254a7a4d8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a42ed07f838ca52f4bba45d70582be053"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a42ed07f838ca52f4bba45d70582be053">utf8_to_utf16</a> (uint16_t *out, const uint8_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:a42ed07f838ca52f4bba45d70582be053"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-8 sequence into a UTF-16 sequence. <a href="utf_8h.html#a42ed07f838ca52f4bba45d70582be053">More...</a><br /></td></tr>
|
|
<tr class="separator:a42ed07f838ca52f4bba45d70582be053"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac9fa7e7747dd618e519e144f6a1aa182"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ac9fa7e7747dd618e519e144f6a1aa182">utf8_to_utf32</a> (uint32_t *out, const uint8_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:ac9fa7e7747dd618e519e144f6a1aa182"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-8 sequence into a UTF-32 sequence. <a href="utf_8h.html#ac9fa7e7747dd618e519e144f6a1aa182">More...</a><br /></td></tr>
|
|
<tr class="separator:ac9fa7e7747dd618e519e144f6a1aa182"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a853ad54c24e5ebcb6a6c2760cb753923"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a853ad54c24e5ebcb6a6c2760cb753923">utf16_to_utf8</a> (uint8_t *out, const uint16_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:a853ad54c24e5ebcb6a6c2760cb753923"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-16 sequence into a UTF-8 sequence. <a href="utf_8h.html#a853ad54c24e5ebcb6a6c2760cb753923">More...</a><br /></td></tr>
|
|
<tr class="separator:a853ad54c24e5ebcb6a6c2760cb753923"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad8491ff70a66d8faa816c81ea409eb6c"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ad8491ff70a66d8faa816c81ea409eb6c">utf16_to_utf32</a> (uint32_t *out, const uint16_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:ad8491ff70a66d8faa816c81ea409eb6c"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-16 sequence into a UTF-32 sequence. <a href="utf_8h.html#ad8491ff70a66d8faa816c81ea409eb6c">More...</a><br /></td></tr>
|
|
<tr class="separator:ad8491ff70a66d8faa816c81ea409eb6c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abaad7426e919e66bb5b6621d366d3148"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#abaad7426e919e66bb5b6621d366d3148">utf32_to_utf8</a> (uint8_t *out, const uint32_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:abaad7426e919e66bb5b6621d366d3148"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-32 sequence into a UTF-8 sequence. <a href="utf_8h.html#abaad7426e919e66bb5b6621d366d3148">More...</a><br /></td></tr>
|
|
<tr class="separator:abaad7426e919e66bb5b6621d366d3148"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aefceec54a91db2aef7bd916b18f0ae20"><td class="memItemLeft" align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#aefceec54a91db2aef7bd916b18f0ae20">utf32_to_utf16</a> (uint16_t *out, const uint32_t *in, size_t len)</td></tr>
|
|
<tr class="memdesc:aefceec54a91db2aef7bd916b18f0ae20"><td class="mdescLeft"> </td><td class="mdescRight">Convert a UTF-32 sequence into a UTF-16 sequence. <a href="utf_8h.html#aefceec54a91db2aef7bd916b18f0ae20">More...</a><br /></td></tr>
|
|
<tr class="separator:aefceec54a91db2aef7bd916b18f0ae20"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>UTF conversion functions. </p>
|
|
</div><h2 class="groupheader">Function Documentation</h2>
|
|
<a id="aab93c2be8e27403ee787ec299bf2bb0d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aab93c2be8e27403ee787ec299bf2bb0d">◆ </a></span>decode_utf16()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t decode_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t * </td>
|
|
<td class="paramname"><em>in</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-16 sequence into a UTF-32 codepoint. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output codepoint </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of input code units consumed </dd>
|
|
<dd>
|
|
-1 for error </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aace78933e35ab187df3ad6bd5a2a6383"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aace78933e35ab187df3ad6bd5a2a6383">◆ </a></span>decode_utf8()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t decode_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>in</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-8 sequence into a UTF-32 codepoint. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output codepoint </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of input code units consumed </dd>
|
|
<dd>
|
|
-1 for error </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a39a8de618e547cfb59367bc254a7a4d8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a39a8de618e547cfb59367bc254a7a4d8">◆ </a></span>encode_utf16()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t encode_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>in</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-32 codepoint into a UTF-16 sequence. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input codepoint</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> must be able to store 2 code units </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af8127b9052fc5671da5589a486bd90c7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af8127b9052fc5671da5589a486bd90c7">◆ </a></span>encode_utf8()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t encode_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>in</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-32 codepoint into a UTF-8 sequence. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input codepoint</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> must be able to store 4 code units </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad8491ff70a66d8faa816c81ea409eb6c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad8491ff70a66d8faa816c81ea409eb6c">◆ </a></span>utf16_to_utf32()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf16_to_utf32 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-16 sequence into a UTF-32 sequence. </p>
|
|
<p>Fills the output buffer up to <em>len</em> code units. Returns the number of code units that the input would produce; if it returns greater than <em>len</em>, the output has been truncated.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a853ad54c24e5ebcb6a6c2760cb753923"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a853ad54c24e5ebcb6a6c2760cb753923">◆ </a></span>utf16_to_utf8()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf16_to_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint16_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-16 sequence into a UTF-8 sequence. </p>
|
|
<p>Fills the output buffer up to <em>len</em> code units. Returns the number of code units that the input would produce; if it returns greater than <em>len</em>, the output has been truncated.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aefceec54a91db2aef7bd916b18f0ae20"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aefceec54a91db2aef7bd916b18f0ae20">◆ </a></span>utf32_to_utf16()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf32_to_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint32_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-32 sequence into a UTF-16 sequence. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abaad7426e919e66bb5b6621d366d3148"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abaad7426e919e66bb5b6621d366d3148">◆ </a></span>utf32_to_utf8()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf32_to_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint32_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-32 sequence into a UTF-8 sequence. </p>
|
|
<p>Fills the output buffer up to <em>len</em> code units. Returns the number of code units that the input would produce; if it returns greater than <em>len</em>, the output has been truncated.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a42ed07f838ca52f4bba45d70582be053"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a42ed07f838ca52f4bba45d70582be053">◆ </a></span>utf8_to_utf16()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf8_to_utf16 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint16_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-8 sequence into a UTF-16 sequence. </p>
|
|
<p>Fills the output buffer up to <em>len</em> code units. Returns the number of code units that the input would produce; if it returns greater than <em>len</em>, the output has been truncated.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac9fa7e7747dd618e519e144f6a1aa182"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac9fa7e7747dd618e519e144f6a1aa182">◆ </a></span>utf8_to_utf32()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ssize_t utf8_to_utf32 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t * </td>
|
|
<td class="paramname"><em>out</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>in</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Convert a UTF-8 sequence into a UTF-32 sequence. </p>
|
|
<p>Fills the output buffer up to <em>len</em> code units. Returns the number of code units that the input would produce; if it returns greater than <em>len</em>, the output has been truncated.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Output sequence </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Input sequence (null-terminated) </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Output length</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>number of output code units produced </dd>
|
|
<dd>
|
|
-1 for error</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd><em>out</em> is not null-terminated </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
|
|
</small></address>
|
|
</body>
|
|
</html>
|