mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-24 15:23:08 +08:00
13
byteUtil/byte_to_str_example_test.go
Normal file
13
byteUtil/byte_to_str_example_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package byteUtil
|
||||
|
||||
import "fmt"
|
||||
|
||||
func ExampleBytesToStr() {
|
||||
b := []byte{'h', 'e', 'l', 'l', 'o'}
|
||||
res := BytesToStr(b)
|
||||
|
||||
fmt.Println(res)
|
||||
|
||||
// Output:
|
||||
// hello
|
||||
}
|
||||
Reference in New Issue
Block a user