Documentation ¶
Overview ¶
Package util contains various helper functions.
Index ¶
- Constants
- func Bytes(value interface{}) ([]byte, error)
- func Bytes2Hex(d []byte) string
- func BytesEqual(a, b []byte) bool
- func BytesToInt(b []byte) int
- func BytesToUInt64(buf []byte) uint64
- func CopyBytes(b []byte) (copiedBytes []byte)
- func FromHex(s string) []byte
- func GetSourceString(obj interface{}) string
- func Hex2Bytes(str string) []byte
- func Hex2BytesFixed(str string, flen int) []byte
- func InsertArray(a string, arr []string) []string
- func IntToBytes(n int) []byte
- func LeftPadBytes(slice []byte, l int) []byte
- func RHashBytes(x interface{}) []byte
- func RHashStr(x interface{}) string
- func RightPadBytes(slice []byte, l int) []byte
- func RlpHash(x interface{}) (h common.Hash)
- func ToByte(s string) []byte
- func ToHex(b []byte) string
- func ToString(b []byte) string
- func UInt64ToBytes(i uint64) []byte
Constants ¶
View Source
const (
STRING_JOIN_CHAR = "\x00"
)
Variables ¶
This section is empty.
Functions ¶
func BytesEqual ¶
YiRan Returns true when the contents of the two []byte are exactly the same
func BytesToInt ¶
func BytesToUInt64 ¶ added in v1.0.6
func GetSourceString ¶
func GetSourceString(obj interface{}) string
func Hex2BytesFixed ¶
func InsertArray ¶
func IntToBytes ¶
func LeftPadBytes ¶
func RHashBytes ¶
func RHashBytes(x interface{}) []byte
func RightPadBytes ¶
func UInt64ToBytes ¶ added in v1.0.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.