convertToHalfWidth function Null safety
- String text
Implementation
String convertToHalfWidth(String text) {
return text.replaceAllMapped(
RegExp(r'[0-9a-zA-Z]'),
(m) => String.fromCharCode(m[0]!.codeUnitAt(0) - 65248),
);
}
String convertToHalfWidth(String text) {
return text.replaceAllMapped(
RegExp(r'[0-9a-zA-Z]'),
(m) => String.fromCharCode(m[0]!.codeUnitAt(0) - 65248),
);
}