mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 10:13:52 +08:00
11 lines
268 B
Go
11 lines
268 B
Go
|
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
|
||
|
}
|