1
scala> var a = "mysql  "
a: String = "mysql  "

scala> a.trim()
res14: String = mysql

scala> a.stripSuffix("l")
res15: String = "mysql  "

scala> a.stripSuffix("l ")
res16: String = "mysql  "

scala> a.stripSuffix("l  ")
res17: String = mysq

scala> a.stripPrefix("my")
res18: String = "sql  "

timger
631 声望22 粉丝

引用和评论

0 条评论