def countWords(str: String) = {
var map = Map.empty[String, Int]
for(word <- str.split("[,]")
scala对字符串处理,统计string类型中特定字段出现的次数
最新推荐文章于 2022-07-07 20:49:15 发布
def countWords(str: String) = {
var map = Map.empty[String, Int]
for(word <- str.split("[,]")