Fancy strings in Scala 3

PHOTO EMBED

Mon Apr 25 2022 20:15:08 GMT+0000 (UTC)

Saved by @joel113 #scala

object LowerCased:
  inline def from(inline s: String): LowerCased = ${ fromImpl('s) }

  import scala.quoted.*
  private def fromImpl(s: Expr[String])(using Quotes): Expr[LowerCased] = 
    ???
content_copyCOPY

https://softwaremill.com/fancy-strings-in-scala-3/