def len.add

bolt@1.27.0.0 · src/rules/suspicious/prefix.bend:43

import bolt@1.27.0.0/src/rules/suspicious/prefix.bend as Prefix
import Base

43# what the char adds to the length: one in plain text, but not the closing
44# quote; nothing anywhere else
45def len.add(mm: Mode, +cc: Char) -> Nat:
46  match mm:
47    case MPlain{}:
48      Bool.pick(Nat, is_cp(cc, 34), 0n, 1n)
49    case other:
50      0n

Uses (5)

Used by (1)