withoutNumbersAndSpaces property

String get withoutNumbersAndSpaces

Returns this string without numbers and white spaces.

Example:

final text = 'Hello World 123';
final withoutNumbersAndSpaces = text.withoutNumbersAndSpaces;
// returns: 'HelloWorld'

Implementation

String get withoutNumbersAndSpaces => replaceAll(RegExp(r'[^a-zA-Z]'), '');