IterableSplitExtensions<T extends Object> extension
Split at index or at first element matching predicate.
- on
-
- Iterable<
T>
- Iterable<
Methods
-
splitAt(
int index) → (List< T> , List<T> ) -
Available on Iterable<
Splits into two lists atT> , provided by the IterableSplitExtensions extensionindex. First list has elements [0..index), secondindex..length. -
splitAtFirstWhere(
ElementPredicate< T> predicate) → (List<T> , List<T> ) -
Available on Iterable<
Splits at the first element whereT> , provided by the IterableSplitExtensions extensionpredicateis true. That element goes in the second list.