Skip to content

Commit

Permalink
refactor(NumberToWords): use trim method from internal methods
Browse files Browse the repository at this point in the history
  • Loading branch information
makhosravi committed Feb 20, 2022
1 parent ad19bb6 commit fc192c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/core/number_to_words/number_to_words.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:persian_tools/persian_tools.dart';
import 'package:persian_tools/src/constants/number_to_words/constants.dart';
import 'package:persian_tools/src/internal_methods.dart';

/// Gets an [int] as input and checks if it's a negative number
bool _isNegative(int number) {
Expand Down Expand Up @@ -64,7 +65,7 @@ String _performer(int number) {
})
.where((element) => element.length > 1)
.toList();
return numberArr.join(andFa).trim();
return trim(numberArr.join(andFa));
}

/// Returns Persian word of the given number in int You can determine
Expand Down

0 comments on commit fc192c3

Please sign in to comment.