Essential Go Strings  Suggest an edit

Replace strings

s := "original string original"
s2 := strings.Replace(s, "original", "replaced", -1)
fmt.Printf("s2: '%s'\n", s2)
s2: 'replaced string replaced'

TODO: replace using regex

  ↑ ↓ to navigate     ↵ to select     Esc to close