EscapeTarget

sealed interface EscapeTarget

Represents a target (commonly a language or format) that strings can be escaped for.

For instance:

  • in HTML < becomes &lt;

  • in JavaScript " becomes \"

This is the inverse of UnescapeTarget.

Inheritors

Functions

Link copied to clipboard
abstract fun escape(input: String): String

Escapes the input string for the target format.