Proposal Details
as there many usage of Replace(old, new, 1).
I Proposal to add ReplaceOnce to strings and bytes package. Like wise ReplaceAll.
func ReplaceOnce(s, old, new string) string {
return Replace(s, old, new, 1)
}
func ReplaceOnce(s, old, new []byte) []byte {
return Replace(s, old, new, 1)
}
Proposal Details
as there many usage of Replace(old, new, 1).
I Proposal to add ReplaceOnce to strings and bytes package. Like wise ReplaceAll.