IsUpperCase constructor
IsUpperCase()
Implementation
IsUpperCase()
: super(
methodName: "isUpperCase",
arity: 0,
targetType: NativeMethodTarget.string,
function: (target, _, _) {
//regex to check if every letter in the string is uppercase, ignoring non-alphabetic characters
final regex = RegExp(r"^[A-Z]*$");
return regex.hasMatch(target);
},
);