Text

io.github.frikit.twirlspec.page.Text
object Text

Whitespace and punctuation normalisation.

Attributes

Source
Text.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Text.type

Members list

Value members

Concrete methods

def containsText(haystack: String, needle: String): Boolean

Whether one piece of text contains another, after both are normalised.

Whether one piece of text contains another, after both are normalised.

Attributes

Source
Text.scala
def normalise(raw: String): String

Canonical form used for every text comparison twirl-spec makes.

Canonical form used for every text comparison twirl-spec makes.

Attributes

Source
Text.scala
def preview(raw: String, max: Int = ...): String

A short single-line preview of some text, for failure messages.

A short single-line preview of some text, for failure messages.

Attributes

Source
Text.scala
def same(a: String, b: String): Boolean

True when two pieces of page/message text are equal after normalisation.

True when two pieces of page/message text are equal after normalisation.

Attributes

Source
Text.scala