github.com/sohaha/zlsgo@v1.7.13-0.20240501141223-10dd1a906f76/zstring/s_110.go (about) 1 //go:build go1.10 2 // +build go1.10 3 4 package zstring 5 6 import ( 7 "strings" 8 ) 9 10 // Buffer Buffer 11 func Buffer(size ...int) *strings.Builder { 12 var b strings.Builder 13 if len(size) > 0 { 14 b.Grow(size[0]) 15 } 16 return &b 17 }