1 Star 0 Fork 0

peiss/ant-learn-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
p005_strings_replacer.go 221 Bytes
一键复制 编辑 原始数据 按行查看 历史
peishuaishuai 提交于 2021-09-10 20:06 +08:00 . 映射map的使用
package main
import (
"fmt"
"strings"
)
func main() {
line := "hello, my name, is peiss"
newReplacer := strings.NewReplacer(",", ";")
newLine := newReplacer.Replace(line)
fmt.Println(line)
fmt.Println(newLine)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/antpython/ant-learn-go.git
git@gitee.com:antpython/ant-learn-go.git
antpython
ant-learn-go
ant-learn-go
master

搜索帮助