hex

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 5 Imported by: 2 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeString

func DecodeString(s string) (b []byte, err error)

DecodeString parses the given hex string to bytes, it can return error if the hex string is invalid. Follows the semantic of ethereum's FromHex.

func EnsurePrefix

func EnsurePrefix(str string) string

EnsurePrefix adds the prefix (0x) to a given hex string.

func HasPrefix

func HasPrefix(str string) bool

HasPrefix returns true if the string starts with 0x.

func ParseBig

func ParseBig(s string) (*big.Int, error)

ParseBig parses the given hex string and returns error if it is invalid.

func TrimPrefix

func TrimPrefix(str string) string

TrimPrefix removes the prefix (0x) of a given hex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL