endsWithAny method

bool endsWithAny(
  1. Iterable<String> suffixes
)

Checks if the string ends with any of the provided suffixes.

Example:

'hello'.endsWithAny(['lo', 'la']); // true

Implementation

bool endsWithAny(Iterable<String> suffixes) {
  return suffixes.any((suffix) => endsWith(suffix));
}