pagedList

fun pagedList(list: List<Any>, page: Int, size: Int): List<Any>

Returns a paged sublist of the given list.

Return

A paged sublist of the original list.

Parameters

list

The original list.

page

The requested page number (1-based index).

size

The number of elements in each page.

Throws

if the start index exceeds the size of the list.