# Replace *Str

Replace returns a new instance of Str with all occurrences of the given substring replaced with the given replacement string.

# Signature

func (s *Str) Replace(old string, new string) *Str

# Examples

str.New("i like c++").Replace("c++", "go").String()
// "i like go"

str.New("rocket πŸš€ man").Replace("πŸš€", "🌎").String()
// "rocket 🌎 man"

str.New("go, go, go!").Replace("go", "Go").String()
// "Go, Go, Go!"

str.New("δ½ ε₯½δΈ–η•Œ").Replace("δ½ ε₯½", "再见").String()
// "ε†θ§δΈ–η•Œ"

str.New("δ½ ε₯½δΈ–η•Œ").Replace("δ½ ε₯½", "").String()
// "δΈ–η•Œ"