Answers for "go when to use string builder"

Go
0

go string builder

var sb strings.Builder

for i := 0; i < 10; i++ {
  sb.WriteString(string(i))
}

fmt.Println(sb.String()) // "12345678910"
Posted by: Guest on September-16-2021

Code answers related to "go when to use string builder"

Browse Popular Code Answers by Language