Initial data:
rawdata := []int{17, 23, 100500}
Result:
result := convert(rawdata)
expected := "1723100500"
What should I do with convert()
? I have:
func convert(param []int) string {
data := strings.Join(param)
return data
}
but it is not work
You should use the function strconv.Itoa
or the fmt.Sprintf("%d",a)
So like this
S := ""
for _,i := range intarray {
S = S + strconv.Itoa( i )
}