Scala-字符串操作 Scala 2023/01/03 常见的字符串相关操作 连续空格去重 12345678val s = "a b c ddd"println(s)println(s.replaceAll(" +", " "))结果:a b c ddda b c ddd 字符串插值 12345val name = "zhangsan"println(s"hello ${name}")结果: hello zhangsan
评论系统未开启,无法评论!