Init commit
This commit is contained in:
13
chapter2/strings/strings.go
Normal file
13
chapter2/strings/strings.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
broken := "G# r#cks!"
|
||||
replacer := strings.NewReplacer("#", "o")
|
||||
fixed := replacer.Replace(broken)
|
||||
fmt.Println(fixed)
|
||||
}
|
||||
Reference in New Issue
Block a user