implicit final class StringInterpolation extends AnyVal
Brings the template engine as a string interpolator.
Basic usage:
import play.twirl.api.StringInterpolation val name = "Martin" val htmlFragment: Html = html"<div>Hello $name</div>"
Three interpolators are available: html
, xml
and js
.
- Source
- package.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- StringInterpolation
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new StringInterpolation(sc: StringContext)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def html(args: Any*): Html
- def interpolate[A <: Appendable[A]](args: Seq[Any], format: Format[A])(implicit arg0: ClassTag[A]): A
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def js(args: Any*): JavaScript
- val sc: StringContext
- def toString(): String
- Definition Classes
- Any
- def xml(args: Any*): Xml