优化
This commit is contained in:
1 parent
1c4f159dbf
commit
00bbc9defa
1 file changed
+1
-1
@@ -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