使用地址:https://jitpack.io/#qiangzhouliang/NumberUtilAndStringhelper
将其添加到存储库末尾的root(项目) build.gradle中:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.qiangzhouliang:NumberUtilAndStringhelper:1.0.1'
}
var numStr = "122.22"
println(NumUtil.doubleToInt(numStr))
封装了字符串和数字转换的一些操作