isSpecialCharacterIncluded static method

bool isSpecialCharacterIncluded(
  1. String string
)

Implementation

static bool isSpecialCharacterIncluded(String string) {
  String ch = "~`!@#\$%^&*.?_";

  for (int i = 0; i < string.length; i++) {
    if (ch.contains(string[i])) {
      return true;
    }
  }
  return false;
}