字符串替换

字符串
Both Server and Client
Both Mobile and PC

将目标字符串中的所有指定字符串替换后,输出新字符串

声明

func Replace(target string, oldValue string, newValue string) string
go

参数

输入

名称 类型 描述
目标 String 目标字符串
要替换的老字符串 String 要替换掉的旧字符串
要替换的新字符串 String 要替换为的新字符串

返回

类型 描述
String 替换完成的字符串