v0.0.101
This commit is contained in:
parent
c266d9204b
commit
c5e23ab451
@ -381,3 +381,19 @@ func ArrCastToAny[T1 any](arr []T1) []any {
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func ArrConcat[T any](arr ...[]T) []T {
|
||||
c := 0
|
||||
for _, v := range arr {
|
||||
c += len(v)
|
||||
}
|
||||
r := make([]T, c)
|
||||
i := 0
|
||||
for _, av := range arr {
|
||||
for _, v := range av {
|
||||
r[i] = v
|
||||
i++
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user