Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func byteStringToBytes(s *string) []byte {
- *s = (*s)[1:len(*s) - 1]
- split := strings.Split(*s, ",")
- res := make([]byte, len(split))
- for i, el := range split {
- r , _ := strconv.Atoi(el)
- res[i] = byte(r)
- }
- return res
- }
Add Comment
Please, Sign In to add comment