Thanks for suggesting this. I agree this is a useful addition.
I’ve implemented this as Array.AppendAll(items) rather than AppendRange. That feels more Objo-like alongside the existing Append() and RemoveAll() methods.
Example:
Var codePoints() As Integer = [65, 66]
Var moreCodePoints() As Integer = [67, 68]
codePoints.AppendAll(moreCodePoints)
# codePoints is now [65, 66, 67, 68]
The method appends the source array’s elements to the receiver. The array remains a normal iterable array afterwards, so For Each works exactly as before.
Arrays of arrays are handled without flattening:
Var rows As Array(Of Array(Of Integer)) = [[1, 2], [3, 4]]
rows.AppendAll([[5, 6]])
Print(rows.Count) # 3
Print(rows[2][0]) # 5
Self-append is handled too: items.AppendAll(items) duplicates the original contents once.
This is implemented in the next release: https://feedback.objo.dev/feature/533