Methods
-
equals(Object other)
→ bool
-
-
negativeIndex(int index)
→ E
-
Similar to negative index in python
[-1]
will return the last thing in the list
0 or over will return its []
operator
-
negativeIndexEquals(int index, E value)
→ void
-
Setter for above
-
slice({int? stop, int start = 0, int step = 1})
→ List<E>
-
Returns a list slice from given list with all indices contained within the
given range. START INCLUSIVE | END EXCLUSIVE. By default start=0, stop=list.length, step=1. Invalid inputs
are met with ArgumentErrors.
ex:
-
splitBeforeIndex(int index)
→ List<List<E>>
-
Returns a list of two sub-lists based off self:
List 1: All items before specified index
List 2: All items after specified index
Negative
[-1]
is the same as the last list item and all negative numbers are likewise
0 leads to [[],[this]]
whereas an index>this.length leads to [this,[]]