toLetter static method
Converts a string to contain only letters.
Example: 'abc123' -> 'abc'
Implementation
static String? toLetter(String? value) {
if (value == null || value.isEmpty) return null;
String buffer = '';
for (String character in value.characters) {
if (Validator.isLetter(character)) buffer = '$buffer$character';
}
return buffer;
}