I want to convert a decimal array to text in string format in golang, is there any function in golang that supports this. Can you give me a sample code? E.g :
97 98 99
a b c
CodePudding user response:
package main
import (
"fmt"
)
func main() {
a := []int{97, 98, 99}
result := []string{}
for _, element := range a {
result = append(result, string(element))
}
fmt.Println(result)
}
[a b c]