android / android-ktx

A set of Kotlin extensions for Android app development.
https://android.github.io/android-ktx/core-ktx/
7.48k stars 565 forks source link

Int extensions #564

Closed heitorzc closed 6 years ago

heitorzc commented 6 years ago

Maybe KTX could have some simple extensions for primitive Int. For example:

10.isEven() 11.isOdd() 12.isDivisibleBy(2) 13.isPositive() -13.isNegative()

Just an idea. ;) Great work guys! KTX is a piece of heaven!

JakeWharton commented 6 years ago

This library is for enhancing types in the android package. These should be proposed to the Kotlin standard library since they are not specific to Android. You can propose them by filing a bug at http://kotl.in/issue