The Go authors have solved this problem thoroughly. When working in Go, I usually never have to think about this.<p><a href="https:&#x2F;&#x2F;blog.golang.org&#x2F;strings" rel="nofollow">https:&#x2F;&#x2F;blog.golang.org&#x2F;strings</a>