标签: scala set
如何通过忽略大小写
Set
val a = Set("Test1","test2" ,"test3") val b = Set("test1","test2" ,"Test3")
答案 0 :(得分:3)
只需转换为小写即可进行比较:
b.map(_.toLowerCase) == a.map(_.toLowerCase)