Documentation ¶
Overview ¶
Package strings contains various common utils for strings
Index ¶
- func IsValidContractAddress(address string) bool
- func IsValidEthAPIURL(url string) bool
- func ListCommonAddressToListString(addresses []common.Address) []string
- func ListCommonAddressesToString(addresses []common.Address) string
- func ListIntToListString(listInt []int) []string
- func ListStringToListCommonAddress(addresses []string) []common.Address
- func RandomHexStr(n int) (string, error)
- func StrOrEmptyStr(s *string) string
- func StrToPtr(s string) *string
- func StringToCommonAddressesList(addresses string) []common.Address
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidContractAddress ¶
IsValidContractAddress returns true is the given string matches a valid smart contract address
func IsValidEthAPIURL ¶
IsValidEthAPIURL returns true if the given string matches a valid eth endpoint URL
func ListCommonAddressToListString ¶
ListCommonAddressToListString converts a list of common.address to list of string
func ListCommonAddressesToString ¶
ListCommonAddressesToString converts a list of common.address to a comma delimited string
func ListIntToListString ¶
ListIntToListString converts a list of big.int to a list of string
func ListStringToListCommonAddress ¶
ListStringToListCommonAddress converts a list of strings to list of common.address
func RandomHexStr ¶
RandomHexStr generates a hex string from a byte slice of n random numbers.
func StrOrEmptyStr ¶
StrOrEmptyStr returns an empty string if a string pointer is nil. Otherwise returns the string value of the pointer.
func StringToCommonAddressesList ¶
StringToCommonAddressesList converts a comma delimited string to a list of common.address
Types ¶
This section is empty.