IntNullSafety extension

int空安全扩展

on

Properties

isNotNull bool

Available on int?, provided by the IntNullSafety extension

判断是否不为空
no setter
isNull bool

Available on int?, provided by the IntNullSafety extension

判断是否为空
no setter
toNonNull int

Available on int?, provided by the IntNullSafety extension

转化为非空整型,如果为空则返回0
no setter

Methods

toNonNullInt([int def = 0]) int

Available on int?, provided by the IntNullSafety extension

判断是否为null,如果为null则返回默认值