isContainSingleCharacter static method

bool isContainSingleCharacter({
  1. required String mainString,
  2. required String charSingle,
})

check contain regix

Implementation

static bool isContainSingleCharacter({ required String mainString, required  String charSingle} )  {
  if(charSingle.length > 1 ) {
    return false;
  }
  var r = RegExp(r"[" + charSingle + "]").hasMatch(mainString);
  // print("abdo - test " + r.toString() );
  return r;
}