Archived
1
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
fwzookeeper/vendor/github.com/kirillDanshin/myutils/strings.go
2018-11-29 20:32:51 +04:00

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)
}