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?
2.1m questions
2.1m answers
60 comments
57.0k users