Conformance Examples 0.1.0 — Transforms: transform-replace¶
replace-two-string-literals¶
Replace all occurrences of a substring via {{ phrase | replace: "world" "Mark" }}.
Template
Context
Output
replace-target-absent¶
Replace when target substring is not present acts as a no-op.
Template
Context
Output
replace-empty-string-target¶
Replacing empty string inserts replacement before each character and at the end. "ab".replace("", "x") = "xaxbx".
Template
Context
Output
replace-chained-after-upcase¶
Chaining replace after upcase: {{ phrase | upcase | replace: "WORLD" "Mark" }}.
Template
Context
Output
Source fixture: transforms/transform-replace.json