Quick actions

cmd+k|ctrl+k

Navigation

Languages

strings.Replace

Snippet info

Language

Go

Visibility

public

Author

kkowalczyk

Created

2019-08-23T17:21:59Z

Updated

2019-08-23T17:21:59Z

// :glot
package main

import (
	"fmt"
	"strings"
)

func main() {
	// :show start
	s := "this is string"
	toRemove := " is"

    after := strings.Replace(s, toRemove, "", -1)    
	fmt.Printf("Removed %#v from %#v => %#v\n\n", toRemove, s, after)
	// :show end
}
INFO