joinOf method

String joinOf(
  1. GetValue<E, String> getVal, [
  2. String separator = ''
])

Get string value for each element and concatenates it with separator.

getVal used to get string value for element. It can be value of some field, or custom stringify function.

Implementation

String joinOf(GetValue<E, String> getVal, [String separator = '']) =>
    fold('', (res, e) => res != '' ? res + separator + getVal(e) : getVal(e));