diff --git a/BeefLibs/corlib/src/Collections/List.bf b/BeefLibs/corlib/src/Collections/List.bf index 7af0b9e8..a809fe53 100644 --- a/BeefLibs/corlib/src/Collections/List.bf +++ b/BeefLibs/corlib/src/Collections/List.bf @@ -323,6 +323,19 @@ namespace System.Collections Add(item); } + public Span GetRange(int offset) + { + Debug.Assert((uint)offset <= (uint)mSize); + return .(mItems + offset, mSize - offset); + } + + public Span GetRange(int offset, int count) + { + Debug.Assert((uint)offset <= (uint)mSize); + Debug.Assert((uint)offset + (uint)count <= (uint)mSize); + return .(mItems + offset, count); + } + /// Returns a pointer to the start of the added uninitialized section public T* GrowUnitialized(int addSize) {