hdkv
/
fwzookeeper
Archived
1
Fork 0
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
fwzookeeper/vendor/github.com/kirillDanshin/myutils/strings.go

20 lines
311 B
Go

package myutils
import "github.com/valyala/bytebufferpool"
// Concat some strings
func Concat(a string, b ...string) string {
if len(b) == 0 {
return a
}
buf := bytebufferpool.Get()
defer bytebufferpool.Put(buf)
buf.SetString(a)
for _, s := range b {
buf.WriteString(s)
}
return string(buf.B)
}