encoding

package
v0.0.0-...-99e6ec7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 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, add_bom bool) []byte

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

func Int32ToByteArray

func Int32ToByteArray(arrayLength int, number uint32) []byte

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