endsWithIgnoreCase static method

bool endsWithIgnoreCase(
  1. String str,
  2. String suffix
)

检查字符串是否以指定后缀结尾(忽略大小写) Check if string ends with suffix (case insensitive)

Implementation

static bool endsWithIgnoreCase(String str, String suffix) {
  return str.toLowerCase().endsWith(suffix.toLowerCase());
}