mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-23 06:49:26 +08:00
14 lines
163 B
Go
14 lines
163 B
Go
package byteUtil
|
|
|
|
import "fmt"
|
|
|
|
func ExampleBytesToStr() {
|
|
b := []byte{'h', 'e', 'l', 'l', 'o'}
|
|
res := BytesToStr(b)
|
|
|
|
fmt.Println(res)
|
|
|
|
// Output:
|
|
// hello
|
|
}
|