formatAtSign method
Returns null if atsign
is null else the formatted atsign
.
atsign
must be non-null.
Implementation
String? formatAtSign(String? atsign) {
if (atsign == null || atsign == '') {
return null;
}
atsign = atsign.trim().toLowerCase().replaceAll(' ', '');
atsign = !atsign.startsWith('@') ? '@' + atsign : atsign;
return atsign;
}