isLettersOnly method
Returns true
if the String
contains only letters (Latin or Greek).
Example
String text = 'hello world';
bool isLettersOnly = text.isLettersOnly(); // Returns true
Implementation
bool isLettersOnly() {
if (this.isBlank) {
return false;
}
final onlyLetters = this.onlyLetters;
return onlyLetters.length == this.length;
}