Commit 479f0caa authored by Gábor Melis's avatar Gábor Melis
Browse files

update docs

parent c1315afd
......@@ -60,9 +60,9 @@ Here is the [official repository][trivial-utf-8-repo] and the
- [function] UTF-8-BYTES-TO-STRING BYTES &KEY (START 0) (END (LENGTH BYTES))
Convert the START, END subsequence of the array of BYTES containing
UTF-8 encoded characters to a STRING. The element type of BYTES may
be anything as long as it can be `COERCE`d into an `(UNSIGNED-BYTES
8)` array. May signal UTF-8-DECODING-ERROR.
UTF-8 encoded characters to a [STRING][type]. The element type of
BYTES may be anything as long as it can be `COERCE`d into
an `(UNSIGNED-BYTES 8)` array. May signal UTF-8-DECODING-ERROR.
- [function] READ-UTF-8-STRING INPUT &KEY NULL-TERMINATED STOP-AT-EOF (CHAR-LENGTH -1) (BYTE-LENGTH -1)
......
......@@ -28,7 +28,7 @@
Trivial UTF-8 is a small library for doing UTF-8-based in- and
output on a Lisp implementation that already supports Unicode -
meaning `CHAR-CODE` and `CODE-CHAR` deal with Unicode character codes.
meaning [`CHAR-CODE`][d1b4] and [`CODE-CHAR`][f0fb] deal with Unicode character codes.
The rationale for the existence of this library is that while
Unicode-enabled implementations usually do provide some kind of
......@@ -85,9 +85,9 @@ Here is the [official repository][trivial-utf-8-repo] and the
- [function] **UTF-8-BYTES-TO-STRING** *BYTES &KEY (START 0) (END (LENGTH BYTES))*
Convert the `START`, `END` subsequence of the array of `BYTES` containing
UTF-8 encoded characters to a `STRING`. The element type of `BYTES` may
be anything as long as it can be `COERCE`d into an `(UNSIGNED-BYTES
8)` array. May signal [`UTF-8-DECODING-ERROR`][3993].
UTF-8 encoded characters to a [`STRING`][3b21]. The element type of
`BYTES` may be anything as long as it can be [`COERCE`][2252]d into
an `(UNSIGNED-BYTES 8)` array. May signal [`UTF-8-DECODING-ERROR`][3993].
<a id='x-28TRIVIAL-UTF-8-3AREAD-UTF-8-STRING-20FUNCTION-29'></a>
......@@ -96,7 +96,7 @@ Here is the [official repository][trivial-utf-8-repo] and the
Read UTF-8 encoded data from `INPUT`, a byte stream, and construct a
string with the characters found. When `NULL-TERMINATED` is given,
stop reading at a null character. If `STOP-AT-EOF`, then stop at
`END-OF-FILE` without raising an error. The `CHAR-LENGTH` and
[`END-OF-FILE`][36d1] without raising an error. The `CHAR-LENGTH` and
`BYTE-LENGTH` parameters can be used to specify the max amount of
characters or bytes to read, where -1 means no limit. May signal
[`UTF-8-DECODING-ERROR`][3993].
......@@ -107,9 +107,14 @@ Here is the [official repository][trivial-utf-8-repo] and the
[04d7]: #x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29 "(#A((13) BASE-CHAR . \"trivial-utf-8\") ASDF/SYSTEM:SYSTEM)"
[13de]: #x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29 "Introduction"
[2252]: http://www.lispworks.com/documentation/HyperSpec/Body/f_coerce.htm "(COERCE FUNCTION)"
[36d1]: http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm "(END-OF-FILE CONDITION)"
[38a6]: #x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29 "Links"
[3993]: #x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29 "(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"
[3b21]: http://www.lispworks.com/documentation/HyperSpec/Body/t_string.htm "(STRING TYPE)"
[843f]: #x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29 "Reference"
[d1b4]: http://www.lispworks.com/documentation/HyperSpec/Body/f_char_c.htm "(CHAR-CODE FUNCTION)"
[f0fb]: http://www.lispworks.com/documentation/HyperSpec/Body/f_code_c.htm "(CODE-CHAR FUNCTION)"
* * *
###### \[generated by [MGL-PAX](https://github.com/melisgl/mgl-pax)\]
......@@ -27,7 +27,7 @@
<div id="content">
<p><a id='x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29'></a></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/doc.lisp#L7">&#955;</a></span></span></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/doc.lisp#L7">&#955;</a></span></span></p>
<h1><a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29">Trivial UTF-8 Manual</a></h1>
......@@ -44,7 +44,7 @@
<p><a id='x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29'></a></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8594;</a> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.asd#L1">&#955;</a></span></span></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8594;</a> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.asd#L1">&#955;</a></span></span></p>
<h2><a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29">1 TRIVIAL-UTF-8 ASDF System Details</a></h2>
......@@ -60,13 +60,13 @@
<p><a id='x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29'></a></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/doc.lisp#L13">&#955;</a></span></span></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28-23A-28-2813-29-20BASE-CHAR-20-2E-20-22trivial-utf-8-22-29-20ASDF-2FSYSTEM-3ASYSTEM-29" title="(#A((13) BASE-CHAR . \&quot;trivial-utf-8\&quot;) ASDF/SYSTEM:SYSTEM)">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/doc.lisp#L13">&#955;</a></span></span></p>
<h2><a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29">2 Introduction</a></h2>
<p>Trivial UTF-8 is a small library for doing UTF-8-based in- and
output on a Lisp implementation that already supports Unicode -
meaning <code>CHAR-CODE</code> and <code>CODE-CHAR</code> deal with Unicode character codes.</p>
meaning <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_c.htm" title="(CHAR-CODE FUNCTION)"><code>CHAR-CODE</code></a> and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_code_c.htm" title="(CODE-CHAR FUNCTION)"><code>CODE-CHAR</code></a> deal with Unicode character codes.</p>
<p>The rationale for the existence of this library is that while
Unicode-enabled implementations usually do provide some kind of
......@@ -81,7 +81,7 @@ on any other libraries.</p>
<p><a id='x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29'></a></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29" title="Reference">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/doc.lisp#L31">&#955;</a></span></span></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-INTRODUCTION-20MGL-PAX-3ASECTION-29" title="Introduction">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29" title="Reference">&#8594;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/doc.lisp#L31">&#955;</a></span></span></p>
<h2><a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29">3 Links</a></h2>
......@@ -90,14 +90,14 @@ on any other libraries.</p>
<p><a id='x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29'></a></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29" title="Reference">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/doc.lisp#L38">&#955;</a></span></span></p>
<p><span class="outer-navigation"><span class="navigation"> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-LINKS-20MGL-PAX-3ASECTION-29" title="Links">&#8592;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-MANUAL-20MGL-PAX-3ASECTION-29" title="Trivial UTF-8 Manual">&#8593;</a> <a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29" title="Reference">&#8634;</a> <a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/doc.lisp#L38">&#955;</a></span></span></p>
<h2><a href="#x-28TRIVIAL-UTF-8-3A-40TRIVIAL-UTF-8-REFERENCE-20MGL-PAX-3ASECTION-29">4 Reference</a></h2>
<p><a id='x-28TRIVIAL-UTF-8-3AUTF-8-BYTE-LENGTH-20FUNCTION-29'></a></p>
<ul>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L31">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-BYTE-LENGTH-20FUNCTION-29" >UTF-8-BYTE-LENGTH</a></span></span> <span class="locative-args">STRING</span></span></p>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L31">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-BYTE-LENGTH-20FUNCTION-29" >UTF-8-BYTE-LENGTH</a></span></span> <span class="locative-args">STRING</span></span></p>
<p>Calculate the amount of bytes needed to encode <code>STRING</code>.</p></li>
</ul>
......@@ -105,7 +105,7 @@ on any other libraries.</p>
<p><a id='x-28TRIVIAL-UTF-8-3ASTRING-TO-UTF-8-BYTES-20FUNCTION-29'></a></p>
<ul>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L69">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3ASTRING-TO-UTF-8-BYTES-20FUNCTION-29" >STRING-TO-UTF-8-BYTES</a></span></span> <span class="locative-args">STRING &amp;KEY NULL-TERMINATE</span></span></p>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L69">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3ASTRING-TO-UTF-8-BYTES-20FUNCTION-29" >STRING-TO-UTF-8-BYTES</a></span></span> <span class="locative-args">STRING &amp;KEY NULL-TERMINATE</span></span></p>
<p>Convert <code>STRING</code> into an array of unsigned bytes containing its UTF-8
representation. If <code>NULL-TERMINATE</code>, add an extra 0 byte at the end.</p></li>
......@@ -114,7 +114,7 @@ representation. If <code>NULL-TERMINATE</code>, add an extra 0 byte at the end.<
<p><a id='x-28TRIVIAL-UTF-8-3AUTF-8-GROUP-SIZE-20FUNCTION-29'></a></p>
<ul>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L112">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-GROUP-SIZE-20FUNCTION-29" >UTF-8-GROUP-SIZE</a></span></span> <span class="locative-args">BYTE</span></span></p>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L112">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-GROUP-SIZE-20FUNCTION-29" >UTF-8-GROUP-SIZE</a></span></span> <span class="locative-args">BYTE</span></span></p>
<p>Determine the amount of bytes that are part of the character whose
encoding starts with <code>BYTE</code>. May signal <a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
......@@ -123,23 +123,23 @@ encoding starts with <code>BYTE</code>. May signal <a href="#x-28TRIVIAL-UTF-8-3
<p><a id='x-28TRIVIAL-UTF-8-3AUTF-8-BYTES-TO-STRING-20FUNCTION-29'></a></p>
<ul>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L176">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-BYTES-TO-STRING-20FUNCTION-29" >UTF-8-BYTES-TO-STRING</a></span></span> <span class="locative-args">BYTES &amp;KEY (START 0) (END (<code>LENGTH</code> <code>BYTES</code>))</span></span></p>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L176">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-BYTES-TO-STRING-20FUNCTION-29" >UTF-8-BYTES-TO-STRING</a></span></span> <span class="locative-args">BYTES &amp;KEY (START 0) (END (<a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_length.htm" title="(LENGTH FUNCTION)"><code>LENGTH</code></a> <code>BYTES</code>))</span></span></p>
<p>Convert the <code>START</code>, <code>END</code> subsequence of the array of <code>BYTES</code> containing
UTF-8 encoded characters to a <code>STRING</code>. The element type of <code>BYTES</code> may
be anything as long as it can be <code>COERCE</code>d into an <code>(UNSIGNED-BYTES
8)</code> array. May signal <a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
UTF-8 encoded characters to a <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_string.htm" title="(STRING TYPE)"><code>STRING</code></a>. The element type of
<code>BYTES</code> may be anything as long as it can be <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_coerce.htm" title="(COERCE FUNCTION)"><code>COERCE</code></a>d into
an <code>(UNSIGNED-BYTES 8)</code> array. May signal <a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
</ul>
<p><a id='x-28TRIVIAL-UTF-8-3AREAD-UTF-8-STRING-20FUNCTION-29'></a></p>
<ul>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L203">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AREAD-UTF-8-STRING-20FUNCTION-29" >READ-UTF-8-STRING</a></span></span> <span class="locative-args">INPUT &amp;KEY NULL-TERMINATED STOP-AT-EOF (CHAR-LENGTH -1) (BYTE-LENGTH -1)</span></span></p>
<li><p><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L203">[function]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AREAD-UTF-8-STRING-20FUNCTION-29" >READ-UTF-8-STRING</a></span></span> <span class="locative-args">INPUT &amp;KEY NULL-TERMINATED STOP-AT-EOF (CHAR-LENGTH -1) (BYTE-LENGTH -1)</span></span></p>
<p>Read UTF-8 encoded data from <code>INPUT</code>, a byte stream, and construct a
string with the characters found. When <code>NULL-TERMINATED</code> is given,
stop reading at a null character. If <code>STOP-AT-EOF</code>, then stop at
<code>END-OF-FILE</code> without raising an error. The <code>CHAR-LENGTH</code> and
<a href="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm" title="(END-OF-FILE CONDITION)"><code>END-OF-FILE</code></a> without raising an error. The <code>CHAR-LENGTH</code> and
<code>BYTE-LENGTH</code> parameters can be used to specify the max amount of
characters or bytes to read, where -1 means no limit. May signal
<a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" title="(TRIVIAL-UTF-8:UTF-8-DECODING-ERROR CONDITION)"><code>UTF-8-DECODING-ERROR</code></a>.</p></li>
......@@ -148,7 +148,7 @@ characters or bytes to read, where -1 means no limit. May signal
<p><a id='x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29'></a></p>
<ul>
<li><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/17ac888a225f93cb80d62e6b8c3636c9bb20ed1e/trivial-utf-8.lisp#L104">[condition]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" >UTF-8-DECODING-ERROR</a></span></span> <span class="locative-args">SIMPLE-ERROR</span></span></li>
<li><span class=reference-bullet><span class=reference><span class="locative-type"><a href="https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-//blob/c1315afd969cab28283c5840a4d6d0b3a2259135/trivial-utf-8.lisp#L104">[condition]</a></span> <span class="reference-object"><a href="#x-28TRIVIAL-UTF-8-3AUTF-8-DECODING-ERROR-20CONDITION-29" >UTF-8-DECODING-ERROR</a></span></span> <span class="locative-args">SIMPLE-ERROR</span></span></li>
</ul>
</div>
</div>
......
......@@ -175,9 +175,9 @@
(defun utf-8-bytes-to-string (bytes &key (start 0) (end (length bytes)))
"Convert the START, END subsequence of the array of BYTES containing
UTF-8 encoded characters to a STRING. The element type of BYTES may
be anything as long as it can be `COERCE`d into an `(UNSIGNED-BYTES
8)` array. May signal UTF-8-DECODING-ERROR."
UTF-8 encoded characters to a [STRING][type]. The element type of
BYTES may be anything as long as it can be `COERCE`d into
an `(UNSIGNED-BYTES 8)` array. May signal UTF-8-DECODING-ERROR."
(declare (type vector bytes)
(type fixnum start end)
#.*optimize*)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment