Documentation ¶
Index ¶
- func ExtractAddress(startIndex int, key []byte) (addr sdk.AccAddress, nextIndex int, err error)
- func ExtractAddressAndString(startIndex int, key []byte) (addr sdk.AccAddress, s string, nextIndex int, err error)
- func ExtractString(startIndex int, key []byte) (s string, nextIndex int, err error)
- func NoLastByte(key []byte) string
- func ToStr(key []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAddress ¶
ExtractAddress extracts addr from a key of the form of ... | lengthPrefixed(addr) | ... starting at a given index. Also returns the index of the first byte following the address.
func ExtractAddressAndString ¶
func ExtractAddressAndString(startIndex int, key []byte) (addr sdk.AccAddress, s string, nextIndex int, err error)
ExtractAddressAndString extracts addr and a null-terminated string from a key of the form of ... | lengthPrefixed(addr) | bytes(string) | 0x0 | ... starting at a given index. Also returns the index of the first byte following the null terminator.
func ExtractString ¶
ExtractString extracts a null-terminated string from a key of the form of ... | bytes(string) | 0x0 | ... starting at a given index. Also returns the index of the first byte following the null terminator.
func NoLastByte ¶
NoLastByte returns sub-slice of the key without the last byte. Panics if length of key is zero.
Types ¶
This section is empty.