Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts a slice of bytes to a space sparated string of hexidecimal bytes (like "7f").
Example ¶
helloWorldBytes, err := StringToBytes("48 65 6c 6c 6f 20 57 6f 72 6c 64 21") if err != nil { panic(err) } fmt.Println(BytesToString(helloWorldBytes))
Output: 48 65 6c 6c 6f 20 57 6f 72 6c 64 21
func StringToBytes ¶
StringToBytes takes a space separated string of hexadecimal bytes (like "7f") and converts them to a slice of bytes.
Example ¶
helloWorldBytes, err := StringToBytes("48 65 6c 6c 6f 20 57 6f 72 6c 64 21") if err != nil { panic(err) } fmt.Println(helloWorldBytes)
Output: [72 101 108 108 111 32 87 111 114 108 100 33]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.