📌  相关文章
📜  Go 用另一个子字符串替换所有出现的子字符串 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:45:01.897000             🧑  作者: Mango

代码示例1
import (
    "fmt"
    "strings"
)

func main() {
    value := "The quick brown fox jumps over the lazy dog"
    // Replace the "fox" with a "horse."
    result := strings.Replace(value, "fox", "horse", -1)
    fmt.Println(result)
}