utf16

package
v0.0.0-...-135f7b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2014 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package utf16 implements encoding and decoding of UTF-16 sequences.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s []byte) string

Decode returns the string represented by the UTF-16 encoding s.

func DecodeRune

func DecodeRune(r1, r2 rune) rune

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.

func Encode

func Encode(s string) []byte

Encode returns the UTF-16 encoding of the specified string str.

func EncodeRune

func EncodeRune(r rune) (r1, r2 rune)

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.

func IsSurrogate

func IsSurrogate(r rune) bool

IsSurrogate returns true if the specified Unicode code point can appear in a surrogate pair.

func MakeUint16

func MakeUint16(l, h byte) uint16

func SplitUint16

func SplitUint16(v uint16) (byte, byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL