All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mchange.sysadmin.taskrunner.HtmlSafeText.scala Maven / Gradle / Ivy

There is a newer version: 0.1.4
Show newest version
package com.mchange.sysadmin.taskrunner

import scala.collection.StringOps
import org.apache.commons.text.StringEscapeUtils

opaque type HtmlSafeText = String // to help us avoid double-scaping by accident

extension (s : String)
  def htmlSafeText : HtmlSafeText = StringEscapeUtils.escapeHtml4(s)

extension (hst : HtmlSafeText)
  def nonEmpty : Boolean = StringOps(hst).nonEmpty // disambiguate extension... grrr.
  def isEmpty : Boolean = hst.isEmpty






© 2015 - 2025 Weber Informatics LLC | Privacy Policy