toOrdinalWords method
Converts this int to ordinal word format, such as converting 1
to 'first'
, or 42
to 'forty-second'
.
Implementation
String toOrdinalWords({
String? locale,
}) {
const transformation = OrdinalWordsTransformation();
final result =
transformation.transform(this, locale ?? Intl.getCurrentLocale());
return result;
}