splitEqually static method

Iterable<String> splitEqually(
  1. String str,
  2. int pieces
)

Splits string based on number of wanted substrings

Implementation

static Iterable<String> splitEqually(String str, int pieces) {
  final len = (str.length / pieces).round();

  return split(str, len);
}