go-easy-utils/strUtil/str_to_byte_example_test.go

14 lines
159 B
Go
Raw Normal View History

package strUtil
import "fmt"
func ExampleStrToBytes() {
s := "hello"
res := StrToBytes(s)
fmt.Printf("%v", res)
// Output:
// [104 101 108 108 111]
}