c

play.twirl.api

StringInterpolation

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
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringInterpolation
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringInterpolation(sc: StringContext)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. def html(args: Any*): Html
  7. def interpolate[A <: Appendable[A]](args: Seq[Any], format: Format[A])(implicit arg0: ClassTag[A]): A
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. def js(args: Any*): JavaScript
  10. val sc: StringContext
  11. def toString(): String
    Definition Classes
    Any
  12. def xml(args: Any*): Xml

Inherited from AnyVal

Inherited from Any

Ungrouped