Tag: unapply Casting-String zu Int mit scala-Abzieher 2 Antworten Ich versuche zu werfen String zu Int mit Abzieher. Mein code sieht wie folgt aus. object Apply { def unapply(s: String): Option[Int] = try { Some(s.toInt) } catch { case _: java.lang.Exception => None } } object implicit-conversionscalatype-conversionunapply