mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
d07fdeec9a
commit
29bd3f5f56
@ -70,7 +70,7 @@ fun String?.isTrue(nullIsTrue: Boolean = false): Boolean {
|
||||
if (this.isNullOrBlank() || this == "null") {
|
||||
return nullIsTrue
|
||||
}
|
||||
return !this.matches("\\s*(?i)(false|no|not|0)\\s*".toRegex())
|
||||
return !this.trim().matches("(?i)^(false|no|not|0)$".toRegex())
|
||||
}
|
||||
|
||||
fun String.splitNotBlank(vararg delimiter: String, limit: Int = 0): Array<String> = run {
|
||||
|
Loading…
Reference in New Issue
Block a user