I want to assign string to bytes array:
var arr [20]byte str := "abc" for k, v := range []byte(str) { arr[k] = byte(v) }
Have another method?
1.4m articles
1.4m replys
5 comments
57.0k users