Emit.escape.other: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/emit.bend as Emit Lines 60-68 of yaml-for-bend@0.1.1.0/emit.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/emit.bend&start_line=60&end_line=68 import Base def escape.other(c: Char) -> String: match c: case Chr{+x}: +n = U32.to_nat(x) Bool.pick(String, U32.is_eq(x, 133), "\\N", Bool.pick(String, U32.is_eq(x, 8232), "\\L", Bool.pick(String, U32.is_eq(x, 8233), "\\P", Bool.pick(String, is_plain.char(x), SCon{Chr{x}, SNil{}}, Bool.pick(String, Nat.is_lt(n, 256n), "\\x" ++ hex.text(2n, n), "\\u" ++ hex.text(4n, n)))))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/emit.bend&name=hex.text https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/emit.bend&name=is_plain.char