MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Rule

Class Rule

src/main/java/trace/util/Production.kt:4–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3import java.util.regex.Matcher
4
5class Production {
6 inner class Rule(val left: String, val right: String) {
7 fun apply(a: String): String {
8 val r = Regex(Regex.escape(left))
9 return r.replace(a, right)
10 }
11 }
12

Callers 1

addRuleMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected