join method

String join([String separator = "" ])

Converts each element to a String and concatenates the strings.

Iterates through elements of this iterable, converts each one to a String by calling Object.toString, and then concatenates the strings, with the separator string interleaved between the elements.

Source

String join([String separator = ""]) {
  if (length == 0) return "";
  StringBuffer buffer = new StringBuffer()..writeAll(this, separator);
  return buffer.toString();
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-collection/ListMixin/join.html