You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
180 B

  1. package gentools
  2. import "fmt"
  3. func FmtSprintArray[T any](arr []T) []string {
  4. res := make([]string, len(arr))
  5. for i, e := range arr {
  6. res[i] = fmt.Sprint(e)
  7. }
  8. return res
  9. }