mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-27 19:41:11 +01:00
small string split join optimization
This commit is contained in:
@@ -8,8 +8,10 @@ import (
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
// CommaSeperatedList returns a list of strings split by commas,
|
||||
// then trim spaces from each element.
|
||||
func CommaSeperatedList(s string) []string {
|
||||
res := strings.Split(s, ",")
|
||||
res := SplitComma(s)
|
||||
for i, part := range res {
|
||||
res[i] = strings.TrimSpace(part)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user