Documentation
¶
Index ¶
- func ByteString(p []byte) string
- func BytesCombine(pBytes ...[]byte) []byte
- func BytesToString(b []byte) string
- func BytesToStringPerf(b []byte) string
- func BytesToUint16(bits []byte) (u uint16, err error)
- func BytesToUint32(bits []byte) (u uint32, err error)
- func BytesToUint64(bits []byte) (u uint64, err error)
- func BytesToUint8(bits []byte) (u uint8, err error)
- func EncodeToString(b []byte) string
- func Float32bits(f float32) uint32
- func Float32frombits(b uint32) float32
- func Float64bits(f float64) uint64
- func Float64frombits(b uint64) float64
- func Int16bits(i int16) uint16
- func Int16frombits(b uint16) int16
- func Int32bits(i int32) uint32
- func Int32frombits(b uint32) int32
- func Int64bits(i int64) uint64
- func Int64frombits(b uint64) int64
- func Int8bits(i int8) uint8
- func Int8frombits(b uint8) int8
- func ParseFloat(s string, bitSize int) (f float64, err error)
- func ParseFloat32(s string) (f float32, err error)
- func ParseFloat64(s string) (f float64, err error)
- func ParseInt(s string, bitSize int) (i int64, err error)
- func ParseUInt(s string, bitSize int) (u uint64, err error)
- func StringToBytes(s string) []byte
- func StringToBytesPerf(s string) []byte
- func Uint16ToBytes(u uint16) []byte
- func Uint32ToBytes(u uint32) []byte
- func Uint64ToBytes(u uint64) []byte
- func Uint8ToBytes(u uint8) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUint16 ¶
BytesToUint16 return uint16 from bits
func BytesToUint32 ¶
BytesToUint32 return uint32 from bits
func BytesToUint64 ¶
BytesToUint64 return uint64 from bits
func BytesToUint8 ¶
BytesToUint8 return uint8 from bits
func EncodeToString ¶
EncodeToString returns the hexadecimal encoding of b.
func Float32bits ¶
Float32bits returns the IEEE 754 binary representation of f.
func Float32frombits ¶
Float32frombits returns the floating point number corresponding to the IEEE 754 binary representation b.
func Float64bits ¶
Float64bits returns the IEEE 754 binary representation of f.
func Float64frombits ¶
Float64frombits returns the floating point number corresponding the IEEE 754 binary representation b.
func ParseFloat ¶
ParseFloat converts the string s to a floating-point number with the precision specified by bitSize: 32 for float32, or 64 for float64. When bitSize=32, the result still has type float64, but it will be convertible to float32 without changing its value.
If s is well-formed and near a valid floating point number, ParseFloat returns the nearest floating point number rounded using IEEE754 unbiased rounding.
func ParseFloat32 ¶
ParseFloat32 converts the string s to a floating-point number with the precision specified by 32 for float32
func ParseFloat64 ¶
ParseFloat64 converts the string s to a floating-point number with the precision specified by 64 for float64
func ParseInt ¶
ParseInt parse hexadecimal encoding of string to int64 The bitSize argument specifies the integer type that the result must fit into. Bit sizes 8, 16, 32, and 64 correspond to int8, int16, int32, and int64.
Types ¶
This section is empty.