DEV Community

Discussion on: golang, why doesn't string type inherit all the methods of strings package?

Collapse
 
bykof profile image
Michael Bykovski

a byte slice and a string can be easily type casted:

s := "abc"
t := []byte(s)
u := string(t)