toInt

open fun toInt(source: Any, defaultValue: Int): Int

Converts the given object into a primitive integer value.

Return

the converted value.

Parameters

source

the object to be converted.

defaultValue

the value that should be returned if the object cannot be converted.


open fun toInt(source: Any): Int

Converts the given object into a primitive integer value.

Return

the converted value.

Parameters

source

the object to be converted.