golang字符串替换

  作者:会飞的

package mainimport ( "fmt" "strings")func main() { str := "测试" str = strings.Replace(str, "测试", "完成", -1) fmt.Println(str)}