revert changes

This commit is contained in:
Sahil-4555 2025-09-27 09:12:07 +05:30
parent 3875127e97
commit 9dd1829439

View file

@ -36,11 +36,6 @@ func FromHex(s string) []byte {
return Hex2Bytes(s) return Hex2Bytes(s)
} }
// has0xPrefix validates str begins with '0x' or '0X'.
func has0xPrefix(str string) bool {
return len(str) >= 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')
}
// CopyBytes returns an exact copy of the provided bytes. // CopyBytes returns an exact copy of the provided bytes.
func CopyBytes(b []byte) (copiedBytes []byte) { func CopyBytes(b []byte) (copiedBytes []byte) {
if b == nil { if b == nil {
@ -52,6 +47,12 @@ func CopyBytes(b []byte) (copiedBytes []byte) {
return return
} }
// has0xPrefix validates str begins with '0x' or '0X'.
func has0xPrefix(str string) bool {
return len(str) >= 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')
}
// isHex validates whether each byte is valid hexadecimal string. // isHex validates whether each byte is valid hexadecimal string.
func isHex(str string) bool { func isHex(str string) bool {
if len(str)%2 != 0 { if len(str)%2 != 0 {