isMixedCase property
Checks whether the String
is consisted of both upper and lower case letters.
Example
String foo = 'Hello World';
bool isMixedCase = foo.isMixedCase; // returns true;
String foo = 'hello world';
bool isMixedCase = foo.isMixedCase; // returns false;
Implementation
bool get isMixedCase {
if (isBlank) {
return false;
}
return toUpperCase() != this && toLowerCase() != this;
}