Kotlin integer string calling toInt() method reports an error NumberFormatException
First convert to Double, then convert to Int
("6").toDouble().toInt()