IterableReplace<T> extension

Replace first or all occurrences in a list.

on

Methods

replaceAllValues(T value, T replacement) List<T>

Available on List<T>, provided by the IterableReplace extension

New list with every value replaced by replacement.
replaceFirst(T value, T replacement) List<T>

Available on List<T>, provided by the IterableReplace extension

New list with first occurrence of value replaced by replacement.