encoding

package
v2.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeUTF16

func DecodeUTF16(b []byte) (string, error)

DecodeUTF16 get a slice of bytes and decode it to UTF-8

func EncodeUTF16

func EncodeUTF16(s string, addBOM bool) []byte

EncodeUTF16 get a utf8 string and translate it into a slice of bytes of ucs2

func IsUTF16

func IsUTF16(s []byte) bool

func UTF16Bom

func UTF16Bom(b []byte) int8

UTF16Bom returns 0 for no BOM, 1 for Big Endian and 2 for little endian it will return -1 if b is too small for having BOM

Types

This section is empty.

Jump to

Keyboard shortcuts

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