diff --git a/AK/Span.h b/AK/Span.h index 31fb59e6b4..a4daf5c4ad 100644 --- a/AK/Span.h +++ b/AK/Span.h @@ -148,6 +148,12 @@ public: return { this->m_values + start, size }; } + ALWAYS_INLINE Span slice(size_t start) const + { + ASSERT(start < this->m_size); + return { this->m_values + start, this->m_size - start }; + } + ALWAYS_INLINE T* offset(size_t start) const { ASSERT(start < this->m_size);