Documentation
¶
Index ¶
- func ByteArrayToString(bytes []byte) string
- func BytesToInteger(bytes []byte) int
- func BytesToLong(bytes []byte) int64
- func BytesToShort(bytes []byte) int16
- func BytesToString(bytes []byte) string
- func CopyOfRange(src []byte, from, to int) []byte
- func IntegerToBytes(x int) []byte
- func LongToBytes(x int64) []byte
- func ShortToBytes(x int16) []byte
- func StringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteArrayToString ¶
ByteArrayToString returns a string representation of a byte array Example: [1, 2, 3, 4] => "[1, 2, 3, 4]"
func BytesToInteger ¶
BytesToInteger converts a byte array to an integer (int32) (big-endian)
func BytesToLong ¶
BytesToLong converts a byte array to a long (int64) (big-endian)
func BytesToShort ¶
BytesToShort converts a byte array to a short (int16) (big-endian)
func BytesToString ¶
BytesToString converts a byte array to a string (UTF-8)
func CopyOfRange ¶
CopyOfRange copies a range of bytes from src
func IntegerToBytes ¶
IntegerToBytes converts an integer (int32) to a byte array (big-endian)
func LongToBytes ¶
LongToBytes converts a long (int64) to a byte array (big-endian)
func ShortToBytes ¶
ShortToBytes converts a short (int16) to a byte array (big-endian)
func StringToBytes ¶
StringToBytes converts a string to a byte array (UTF-8)
Types ¶
This section is empty.