RapidString is a faster Scala string interpolation replacement. It is inspired by Fastering (https://github.com/Atry/fastring). Some code is copied from Fastring.
RapidString
uses string interpolation syntax.
import com.quadas.rapidstring.RapidString._
def poem() {
val f = "forgotten"
val m = "machinery"
rapid"My mouth is snow slowly caking that stiff pigeon. My mouth, the intricately moist $m of a plant. I have $f if I ever had a mouth"
}
[TODO] benchmark
Put these lines in your build.sbt
if you use Sbt:
resolvers += Resolver.bintrayRepo("quadas", "maven")
libraryDependencies += "com.quadas" %% "rapidstring" % "0.1.3.2"
See https://bintray.com/quadas/maven/rapidstring/0.1.3.2 if you use Maven or other build systems.