mirror of
https://github.com/golang/go
synced 2024-11-23 06:20:07 -07:00
Update example_test.go
This commit is contained in:
parent
b70745717a
commit
4a135000ba
@ -199,8 +199,10 @@ func ExampleRepeat() {
|
|||||||
|
|
||||||
func ExampleReplace() {
|
func ExampleReplace() {
|
||||||
fmt.Println(strings.Replace("oink oink oink", "k", "ky", 2))
|
fmt.Println(strings.Replace("oink oink oink", "k", "ky", 2))
|
||||||
|
fmt.Println(strings.Replace("oink oink oink", "oink", "moo", -1))
|
||||||
// Output:
|
// Output:
|
||||||
// oinky oinky oink
|
// oinky oinky oink
|
||||||
|
// moo moo moo
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleReplaceAll() {
|
func ExampleReplaceAll() {
|
||||||
|
Loading…
Reference in New Issue
Block a user