withoutSymbols property

String get withoutSymbols

Returns this string without special characters and symbols.

Example:

final text = 'Hello World! 123';
final withoutSpecialCharactersAndSymbols = text.withoutSymbols;
// returns: 'HelloWorld123'

Implementation

String get withoutSymbols => replaceAll(RegExp(r'[^a-zA-Z0-9]'), '');