mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2024-05-03 11:34:53 +08:00
14 lines
159 B
Go
14 lines
159 B
Go
|
package strUtil
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
func ExampleStrToBytes() {
|
||
|
s := "hello"
|
||
|
res := StrToBytes(s)
|
||
|
|
||
|
fmt.Printf("%v", res)
|
||
|
|
||
|
// Output:
|
||
|
// [104 101 108 108 111]
|
||
|
}
|