摘要: //判断string 是否是数值 def isNotIntType(str: String): Boolean = { val pattern = "^(\\d+)$".r str match { case pattern(_*) => false case _ => true } } //判断st 阅读全文
posted @ 2020-04-01 15:10 等木鱼的猫 阅读(116) 评论(0) 推荐(0) 编辑
摘要: val str1="{\"id\":\"001\",\"value\":[{\"fruitName\":\"apple\",\"weight\":\"1\"},{\"fruitName\":\"orange\",\"weight\":\"2\"},{\"fruitName\":\"strawberr 阅读全文
posted @ 2020-04-01 15:01 等木鱼的猫 阅读(429) 评论(0) 推荐(0) 编辑
摘要: import java.io.Fileimport scala.io.Source val filePath = new File("C:\\Users\\peanut\\Desktop\\apple.txt") val source=Source.fromFile(filePath)val sou 阅读全文
posted @ 2020-04-01 14:59 等木鱼的猫 阅读(190) 评论(0) 推荐(0) 编辑