1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/commonspace/headsync/util.go
Mikhail Rakhmanov 253968a8d8
Use string hash
2025-03-28 19:42:54 +01:00

24 lines
315 B
Go

package headsync
import (
"strings"
)
func concatStrings(strs []string) string {
if len(strs) == 1 {
return strs[0]
}
var (
b strings.Builder
totalLen int
)
for _, s := range strs {
totalLen += len(s)
}
b.Grow(totalLen)
for _, s := range strs {
b.WriteString(s)
}
return b.String()
}