rclone/vendor/github.com/pengsrc/go-shared/convert/string.go

11 lines
268 B
Go
Raw Normal View History

package convert
// StringSliceWithConverter converts a list of string using the passed converter function
func StringSliceWithConverter(s []string, c func(string) string) []string {
out := []string{}
for _, i := range s {
out = append(out, c(i))
}
return out
}