You do not have to do anything. If you only need to read the bytes of the string, you can do this directly:
c := s[3]
Cthom06's answer gives you a byte fragment that you can manipulate:
b := []byte(s) b[3] = c
Then you can create a new line from the modified byte fragment if you want:
s = string(b)
But you mentioned ASCII. If you start with an ASCII string, then you're done. If there is anything else in it, you need to deal more and may want to post another question with more details about your data.
Sonia Oct 19 '12 at 13:12 2012-10-19 13:12
source share