github.com/sandwich-go/boost@v1.3.29/xcmd/cmd_slice.go (about)

     1  package xcmd
     2  
     3  import (
     4  	"github.com/sandwich-go/boost/xstrings"
     5  )
     6  
     7  const defaultSliceSeparator = ","
     8  
     9  // Slice 将 defaultSliceSeparator 分割的字符获取slice
    10  func Slice(v string) []string { return xstrings.SplitAndTrim(v, defaultSliceSeparator) }