toCardinalWords method
Converts this int to cardinal word format, such as converting 1
to 'one'
, or 42
to 'forty-two'
.
Implementation
String toCardinalWords({
String? locale,
}) {
const transformation = CardinalWordsTransformation();
final result =
transformation.transform(this, locale ?? Intl.getCurrentLocale());
return result;
}