
com.mchange.sysadmin.taskrunner.HtmlSafeText.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mchange-sysadmin-scala_3 Show documentation
Show all versions of mchange-sysadmin-scala_3 Show documentation
A library of utilities for sysadmin scripts
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