utils

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexStringToBigInt

func HexStringToBigInt(input string) (*big.Int, error)

func HexStringToUint64

func HexStringToUint64(input string) (uint64, error)

func SanitizeStringForNumber

func SanitizeStringForNumber(in string) string

SanitizeStringForNumber removes '"', 'any leading redundant 0 before number part' and 'space' from the input string, returns a string with hex prefix. See outputs for sample inputs:

0x0000a -> 0xa

0x0000a0 -> 0xa0

" 0x0000a " -> 0xa

0x000 -> 0x0

0x0 -> 0x0

Types

This section is empty.

Jump to

Keyboard shortcuts

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