conjuctionJoin static method

String conjuctionJoin(
  1. List<String> list, {
  2. String separator = ', ',
  3. String conjuction = ' or ',
})

Concates a list by inserting separator between each item in the list, except for the last separator where conjuction is used instead. If you don't pass separator then ',' is used. If you don't pass conjuction then 'or' is used. If the list is empty then an empty String is returned.

Example:

    final list = []'Girl', 'Boy', 'Other']
    print(Strings.conjuctionJoin(list));
    => Girl, Boy or Other

Implementation

static String conjuctionJoin(
  List<String> list, {
  String separator = ', ',
  String conjuction = ' or ',
}) => Transform.conjuctionJoin(list, separator: separator, last: conjuction);