2025-01-15
?:是Elvis Operator
作用:结果是null,返回默认值
val inputValueDouble = inputValue.toDoubleOrNull() ?: 0.0