diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/go/unicode%2Futf16%2Findex.html | |
new repository
Diffstat (limited to 'devdocs/go/unicode%2Futf16%2Findex.html')
| -rw-r--r-- | devdocs/go/unicode%2Futf16%2Findex.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/devdocs/go/unicode%2Futf16%2Findex.html b/devdocs/go/unicode%2Futf16%2Findex.html new file mode 100644 index 00000000..e846c303 --- /dev/null +++ b/devdocs/go/unicode%2Futf16%2Findex.html @@ -0,0 +1,22 @@ +<h1> Package utf16 </h1> <ul id="short-nav"> +<li><code>import "unicode/utf16"</code></li> +<li><a href="#pkg-overview" class="overviewLink">Overview</a></li> +<li><a href="#pkg-index" class="indexLink">Index</a></li> +</ul> <h2 id="pkg-overview">Overview </h2> <p>Package utf16 implements encoding and decoding of UTF-16 sequences. </p> <h2 id="pkg-index">Index </h2> <ul id="manual-nav"> +<li><a href="#AppendRune">func AppendRune(a []uint16, r rune) []uint16</a></li> +<li><a href="#Decode">func Decode(s []uint16) []rune</a></li> +<li><a href="#DecodeRune">func DecodeRune(r1, r2 rune) rune</a></li> +<li><a href="#Encode">func Encode(s []rune) []uint16</a></li> +<li><a href="#EncodeRune">func EncodeRune(r rune) (r1, r2 rune)</a></li> +<li><a href="#IsSurrogate">func IsSurrogate(r rune) bool</a></li> +</ul> <h3>Package files</h3> <p> <span>utf16.go</span> </p> <h2 id="AppendRune">func <span>AppendRune</span> <span title="Added in Go 1.20">1.20</span> </h2> <pre data-language="go">func AppendRune(a []uint16, r rune) []uint16</pre> <p>AppendRune appends the UTF-16 encoding of the Unicode code point r to the end of p and returns the extended buffer. If the rune is not a valid Unicode code point, it appends the encoding of U+FFFD. </p> +<h2 id="Decode">func <span>Decode</span> </h2> <pre data-language="go">func Decode(s []uint16) []rune</pre> <p>Decode returns the Unicode code point sequence represented by the UTF-16 encoding s. </p> +<h2 id="DecodeRune">func <span>DecodeRune</span> </h2> <pre data-language="go">func DecodeRune(r1, r2 rune) rune</pre> <p>DecodeRune returns the UTF-16 decoding of a surrogate pair. If the pair is not a valid UTF-16 surrogate pair, DecodeRune returns the Unicode replacement code point U+FFFD. </p> +<h2 id="Encode">func <span>Encode</span> </h2> <pre data-language="go">func Encode(s []rune) []uint16</pre> <p>Encode returns the UTF-16 encoding of the Unicode code point sequence s. </p> +<h2 id="EncodeRune">func <span>EncodeRune</span> </h2> <pre data-language="go">func EncodeRune(r rune) (r1, r2 rune)</pre> <p>EncodeRune returns the UTF-16 surrogate pair r1, r2 for the given rune. If the rune is not a valid Unicode code point or does not need encoding, EncodeRune returns U+FFFD, U+FFFD. </p> +<h2 id="IsSurrogate">func <span>IsSurrogate</span> </h2> <pre data-language="go">func IsSurrogate(r rune) bool</pre> <p>IsSurrogate reports whether the specified Unicode code point can appear in a surrogate pair. </p><div class="_attribution"> + <p class="_attribution-p"> + © Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br> + <a href="http://golang.org/pkg/unicode/utf16/" class="_attribution-link">http://golang.org/pkg/unicode/utf16/</a> + </p> +</div> |
