Apologies.I did this 'strings.Split(C.GoString(*C.char),""). I am getting 'Incompatible types' compilation error.
Thanks On Wed, May 1, 2019 at 12:30 AM Nitish Saboo <nitish.sabo...@gmail.com> wrote: > Hi, > > I want to convert *C.char to array of strings in Go. > I want to do this because I want the first word from the string.Strings > are getting appended to *C.char and I want the first word of the string. > I am doing it using 'strings.Split(C.GoString(*C.char))[0]', but it is > giving error. > Can someone correct me here ? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.