def text.fill_with

ezsys@0.1.0.0 · src/text.bend:198

import ezsys@0.1.0.0/src/text.bend as Text
import Base

198# every marker between open and close replaced by its key's value
199def text.fill_with(
200  open: String,
201  close: String,
202  tpl: String,
203  pairs: text.Pairs()
204) -> String:
205  match open close:
206    case SNil{} _:
207      tpl
208    case SCon{_oh, _ot} SNil{}:
209      tpl
210    case SCon{oh, ot} SCon{ch, ct}:
211      text.go(tpl, Plain{}, SCon{oh, ot}, SCon{ch, ct}, pairs)

Uses (4)

Used by (2)