Lex.unescape: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex Lines 193-201 of cswap-bend-cli@0.1.0.0/json/lex.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&start_line=193&end_line=201 import Base # Decode the escapes of a string body. `fuel` is its length. def unescape(fuel: Nat, s: String) -> String: match fuel s: case _ SNil{}: SNil{} case 0n _: SNil{} case 1n+p SCon{Chr{+c}, +t}: SCon{Chr{esc.cp(c, t)}, unescape(p, String.drop(t, esc.skip(c, t)))} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=esc.cp https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=esc.skip