【发布时间】:2020-12-02 06:19:24
【问题描述】:
我知道我们可以用忽略大小写写if, else if, else if。
if (someString.equals("otherString", ignoreCase = true)) {
}
对此我很好奇,如何在忽略大小写的情况下编写 when(在 Java 中是 switch)条件。
【问题讨论】:
-
when(someString.toLower()) { "bla" -> ...
标签: kotlin case kotlin-when