v0.0.241 join string array

This commit is contained in:
Julian Graf 2023-08-14 15:54:50 +02:00
parent 202afc9068
commit 56ae0cfc6c
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.240" const GoextVersion = "0.0.241"
const GoextVersionTimestamp = "2023-08-14T15:36:12+0200" const GoextVersionTimestamp = "2023-08-14T15:54:50+0200"

View File

@ -467,3 +467,13 @@ func ArrayToInterface[T any](t []T) []interface{} {
} }
return res return res
} }
func JoinString(arr []string, delimiter string) string {
str := ""
for i, v := range arr {
str += v
if i < len(arr)-1 {
str += delimiter
}
}
}