GO lang

고요한하늘 2015. 6. 7. 13:59
func Replace(s, old, new string, n int) string


package main


import (

"fmt"

"strings"

)


func main() {

fmt.Println(strings.Replace("oink oink oink", "k", "ky", 2))

fmt.Println(strings.Replace("oink oink oink", "oink", "moo", -1))

}


http://golang.org/pkg/strings/