IntNullableExtensions extension
int Extensions
- on
-
- int?
Methods
-
addZeroPrefix(
) → String? -
Available on int?, provided by the IntNullableExtensions extension
Adds a zero prefix to a single-digit number. -
days(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in days. -
hours(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in hours. -
isNull(
) → bool -
Available on int?, provided by the IntNullableExtensions extension
Checks if the given integer is null. -
lastDigits(
int n) → int -
Available on int?, provided by the IntNullableExtensions extension
Gets the lastn
digits of the number. -
microseconds(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in microseconds. -
milliseconds(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in milliseconds. -
minutes(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns minutes duration -
months(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in months (assuming 30 days per month). -
seconds(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in seconds. -
toBool(
[int value = 1]) → bool -
Available on int?, provided by the IntNullableExtensions extension
Converts the integer to a boolean, where1
istrue
and all other values arefalse
. -
validate(
[int value = 0]) → int -
Available on int?, provided by the IntNullableExtensions extension
Validates the given integer and returns the provided default value if null. -
weeks(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in weeks (7 days per week). -
years(
[int value = 0]) → Duration -
Available on int?, provided by the IntNullableExtensions extension
Returns a duration in years (assuming 365 days per year).