def named.of

emerging-ezhttp@0.21.0.0 · src/unescape.bend:176

import emerging-ezhttp@0.21.0.0/src/unescape.bend as Unescape
import Base
import emerging-ezhttp@0.21.0.0/src/entities.bend as Ents

176# a reference's text once its longest name is known: the characters, then
177# the text after the name as written; with no name, `&` and the text
178def named.of(m: Maybe<&2, Ents.Ref>, s: String) -> String:
179  match m:
180    case None{}:
181      SCon{'&', s}
182    case Some{Ents.Ref{+name, first, second}}:
183      chars(first, second) ++ String.drop(s, String.length(name))

Uses (8)

Used by (1)