Skip to content

Commit 4a13500

Browse files
authored
Update example_test.go
1 parent b707457 commit 4a13500

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/strings/example_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ func ExampleRepeat() {
199199

200200
func ExampleReplace() {
201201
fmt.Println(strings.Replace("oink oink oink", "k", "ky", 2))
202+
fmt.Println(strings.Replace("oink oink oink", "oink", "moo", -1))
202203
// Output:
203204
// oinky oinky oink
205+
// moo moo moo
204206
}
205207

206208
func ExampleReplaceAll() {

0 commit comments

Comments
 (0)