AbstractEcmaStringOperations

GetSubstitution: the $1, $&, $<name> patterns a replacement string can carry.

Types

Link copied to clipboard
abstract class ReplacementOperation

What String.prototype.replace puts in place of each match.

Functions

Link copied to clipboard

Compiles a replacement template into the pieces getSubstitution stitches together.

Link copied to clipboard
fun <T> getSubstitution(cx: Context, scope: Scriptable, matched: String, str: String, position: Int, capturesList: List<T>, namedCaptures: Any?, replacementTemplate: List<AbstractEcmaStringOperations.ReplacementOperation>): String