RichString

uk.gov.hmrc.govukfrontend.views.implicits.RichStringSupport.RichString
implicit class RichString(s: String)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class RichString

Members list

Value members

Concrete methods

def indent(n: Int, indentFirstLine: Boolean): String

Indent a (multiline) string n spaces.

Indent a (multiline) string n spaces.

Value parameters

n

Number of spaces to indent the string. It can be a negative value, in which case it attempts to unindent n spaces, as much as possible until it hits the margin.

Attributes

def ltrim: String
def nunjucksCapitalize: String

Implements https://mozilla.github.io/nunjucks/templating.html#capitalize. Unlike Scala's scala.collection.immutable.StringLike#capitalize() Nunjucks' capitalize converts the first letter to uppercase and the rest to lowercase.

Implements https://mozilla.github.io/nunjucks/templating.html#capitalize. Unlike Scala's scala.collection.immutable.StringLike#capitalize() Nunjucks' capitalize converts the first letter to uppercase and the rest to lowercase.

Attributes

def rtrim: String
def toHint: Hint
def toKey: Key
def toLabel: Label
def toOption: Option[String]
def toTag: Tag
def toText: Text