all method

bool all(
  1. bool test(
    1. String element
    )
)

True if all characters match the given test.

Implementation

bool all(bool Function(String element) test) {
  for (final c in characters) {
    if (!test(c)) {
      return false;
    }
  }
  return true;
}