mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -57,7 +57,7 @@ fun String?.isTrue(nullIsTrue: Boolean = false): Boolean {
|
||||
if (this.isNullOrBlank() || this == "null") {
|
||||
return nullIsTrue
|
||||
}
|
||||
return this.matches("\\s*(?i)(true|ok|yes|1)\\s*".toRegex())
|
||||
return !this.matches("\\s*(?i)(false|no|not|0)\\s*".toRegex())
|
||||
}
|
||||
|
||||
fun String.splitNotBlank(vararg delimiter: String): Array<String> = run {
|
||||
|
||||
Reference in New Issue
Block a user