From f5cbef7ce5f6bc6f35399f8b9544bcdafea89b38 Mon Sep 17 00:00:00 2001 From: KiloG <33695125+JOJO0527@users.noreply.github.com> Date: Tue, 28 Dec 2021 12:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=AD=BE=E5=90=8D=E4=B8=AD?= =?UTF-8?q?=E5=B0=91=E4=BA=86=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=20(#816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eBook/04.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eBook/04.7.md b/eBook/04.7.md index 7186df1..3350e0b 100644 --- a/eBook/04.7.md +++ b/eBook/04.7.md @@ -108,7 +108,7 @@ func main() { `Replace` 用于将字符串 `str` 中的前 `n` 个字符串 `old` 替换为字符串 `new`,并返回一个新的字符串,如果 `n = -1` 则替换所有字符串 `old` 为字符串 `new`: ```go -strings.Replace(str, old, new, n) string +strings.Replace(str, old, new string, n int) string ``` ## 4.7.5 统计字符串出现次数