| 123456789101112131415161718192021222324252627282930313233343536 | package networkimport (	"encoding/hex"	"strings")type String stringfunc (s String) Trim(str ...string) String {	ns := string(s)	for _, x := range str {		ns = strings.ReplaceAll(ns, x, "")	}	return String(ns)}func (s String) ToByte() Byte {	return Byte(s[0])}func (s String) ToBytes() Bytes {	return Bytes(s)}func (s String) Hex() Bytes {	str := strings.ToLower(string(s))	str = strings.ReplaceAll(str, hexPrefix, "")	str = strings.ReplaceAll(str, " ", "")	dst, err := hex.DecodeString(str)	if err != nil {		return nil	}	return dst}
 |