IntX extension
Core extensions on int adding parity checks, digits access, and iterative utilities.
- on
Properties
- digitCount → int
-
Available on int, provided by the IntX extension
Number of decimal digits (ignores sign).no setter -
digits
→ List<
int> -
Available on int, provided by the IntX extension
Individual digits, most-significant first.no setter - isEven → bool
-
Available on int, provided by the IntX extension
Returns true if the number is even.no setter - isOdd → bool
-
Available on int, provided by the IntX extension
Returns true if the number is odd.no setter
Methods
-
isBetween(
int min, int max) → bool -
Available on int, provided by the IntX extension
Checks if the integer is betweenminandmaxinclusively. -
times(
void action()) → void -
Available on int, provided by the IntX extension
Executesactionthistimes. Equivalent to aforloop. -
to(
int end, {int step = 1}) → Iterable< int> - Inclusive range as a lazy iterable.