Skip to content

Commit

Permalink
FEAT: uma extensão que converte valores String monetários em String;
Browse files Browse the repository at this point in the history
  • Loading branch information
ivictoruan committed Jun 1, 2023
1 parent c732b0a commit 6141ccc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/core/extentions/monetary_extention.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extension StringExtension on String {
String convertCurrencyValues() {
String valueWithoutSymbol = replaceAll(',', '.').replaceAll('R\$', '').trim();
return valueWithoutSymbol;
// return double.parse(valueWithoutSymbol);
}
}

0 comments on commit 6141ccc

Please sign in to comment.