feat: add ReplaceWithMap

This commit is contained in:
dudaodong committed 2023-05-10 10:29:26 +08:00
1 parent f5784b0f46
commit c3f1bc39d7
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -526,14 +526,14 @@ func ExampleIndexOffset() {
// -1
}
func ExampleReplaceByMap() {
func ExampleReplaceWithMap() {
str := "ac ab ab ac"
replaces := map[string]string{
"a": "1",
"b": "2",
}
result := ReplaceByMap(str, replaces)
result := ReplaceWithMap(str, replaces)
fmt.Println(result)
// Output: