Scala
package n
object test6 {
class StrongString(str:String){
def isPhone(str:String): Boolean = {
val reg = "1[3-9]\\d{9}".r
reg.matches(str)
}
def isEmail : Boolean ={
}
}
implicit def stringToStrongString(str:String):StrongString={
new StrongString(str)
}
def main(args: Array[String]): Unit = {
}
}
原文地址:https://blog.csdn.net/2401_87373448/article/details/144335738
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!