toInt

fun Boolean.toInt(): Int

Convert Boolean to Int.

Example:

true.toInt() // 1
false.toInt() // 0

Since

1.1.0