What's the best way to manipulate strings in Golang? or How do you efficiently work with strings in G

16 Replies, 1919 Views

Thanks for all the tips, folks! `strings.Builder` was exactly what I needed—way cleaner than my old `+=` mess.

I tried `[]rune` for some Unicode stuff, and it worked like a charm.

One follow-up: anyone got a favorite lib for string templating? Or is `fmt.Sprintf` the way to go?

Also, that gobyexample link is gold. Bookmarked!

Messages In This Thread



Users browsing this thread: 1 Guest(s)