endsWithAny method

  1. @useResult
bool endsWithAny(
  1. List<String> find
)

Returns true if this string ends with any character in find.

Implementation

@useResult
bool endsWithAny(List<String> find) {
  if (isEmpty || find.isEmpty) {
    return false;
  }

  final String lastChar = last(1);

  return find.any((String e) => e == lastChar);
}