IntExtensions extension
includes ComparableExtensions on double
- on
Methods
-
limitTo(
int min, int max) → int -
Available on int, provided by the IntExtensions extension
returns this if it is betweenmin
andmax
(inclusive) otherwise returnsmin
ormax
whichever is closer -
toNumeral(
[String? locale]) → String -
Available on int, provided by the IntExtensions extension
represents this number on its text form as a cardinal -
toRadixExtended(
int radix) → String -
Available on int, provided by the IntExtensions extension
similar to toRadixString but supports up to base 64. It does not match the original toRadixString implementation, because Dart uses lower-case representation for digits 10 to 35, while this one uses upper-case first. This matches encoding of https://en.wikipedia.org/wiki/Base62 and https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.408 -
withLowerLimit(
int min) → int -
Available on int, provided by the IntExtensions extension
returns this if it is not greater than max, otherwise max -
withUpperLimit(
int max) → int -
Available on int, provided by the IntExtensions extension
returns this if it is not greater thanmax
, otherwisemax