From 29bd3f5f564791a238157f2d333c821651d063c4 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Thu, 27 Oct 2022 22:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/utils/StringExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/utils/StringExtensions.kt b/app/src/main/java/io/legado/app/utils/StringExtensions.kt index a02596bdb..3780e9ba8 100644 --- a/app/src/main/java/io/legado/app/utils/StringExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/StringExtensions.kt @@ -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 = run {