Documentation ¶
Index ¶
- func B2I(b []byte) int
- func B2I16(b []byte) int16
- func B2I32(b []byte) int32
- func B2I64(b []byte) int64
- func B2I8(b []byte) int8
- func B2S(b []byte) string
- func B2U(b []byte) uint
- func B2U16(b []byte) uint16
- func B2U32(b []byte) uint32
- func B2U64(b []byte) uint64
- func B2U8(b []byte) uint8
- func BytesToLowerCase(buf []byte)
- func BytesToUpperCase(buf []byte)
- func BytesTrimLeft(buf []byte) []byte
- func BytesTrimRight(buf []byte) []byte
- func Equal(a, b []byte) bool
- func I16ToB(i int16) []byte
- func I2B(i int) []byte
- func I32ToB(i int32) []byte
- func I64ToB(i int64) []byte
- func I8ToB(i int8) []byte
- func PutI(b []byte, i int)
- func PutI16(b []byte, i int16)
- func PutI32(b []byte, i int32)
- func PutI64(b []byte, i int64)
- func PutI8(b []byte, i int8)
- func PutU(b []byte, u uint)
- func PutU16(b []byte, u uint16)
- func PutU32(b []byte, u uint32)
- func PutU64(b []byte, u uint64)
- func PutU8(b []byte, u uint8)
- func S2B(s string) (b []byte)
- func U16ToB(u uint16) []byte
- func U2B(u uint) []byte
- func U32ToB(u uint32) []byte
- func U64ToB(u uint64) []byte
- func U8ToB(u uint8) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToLowerCase ¶ added in v1.0.5
func BytesToLowerCase(buf []byte)
BytesToLowerCase converts all bytes in buf to lowercase.
func BytesToUpperCase ¶ added in v1.0.5
func BytesToUpperCase(buf []byte)
BytesToUpperCase converts all bytes in buf to uppercase.
func BytesTrimLeft ¶ added in v1.0.5
BytesTrimLeft trims all empty bytes (' ') from the left and returns a new slice.
func BytesTrimRight ¶ added in v1.2.0
BytesTrimRight trims all empty bytes (' ') from the right and returns a new slice.
func Equal ¶
Equal returns true if the two bytes slice are equal. If you are sure that two bytes slice have same length, use EqualValue instead.
func I2B ¶ added in v1.1.0
I2B converts an int to a byte slice using unsafe. Return a byte slice of length 8!
func PutI ¶ added in v1.2.0
PutI put an int to a byte slice using unsafe. The byte slice len must be 8 or the byte slice must be nil!
func PutU ¶ added in v1.2.0
PutU put an uint to a byte slice using unsafe. The byte slice len must be 8!
func U2B ¶ added in v1.1.0
U2B converts an uint to a byte slice using unsafe. Return a byte slice of length 8!
Types ¶
This section is empty.