jweinst1
1/16/2016 - 12:11 AM

turns a string into bytes

turns a string into bytes

package main
//turn a string to byte arr
import "fmt"


func main() {
    fmt.Print(strtobyte("abcdefghijklmnopqrstuvwxyz"))
    /*[97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122] */
}

func strtobyte(input string) []byte{
    return []byte(input)
}