Strings.closes: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/perf/strings.bend as Strings Lines 23-32 of bolt@1.27.0.0/src/rules/perf/strings.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/perf/strings.bend&start_line=23&end_line=32 import Base # does the text end on a closing quote, its escapes read as a backslash and # the one char after it? esc: the char before was an unescaped backslash; # shut: it was an unescaped quote def closes(cs: List<&2, Char>, +esc: Bool, +shut: Bool) -> Bool: match cs: case Nil{}: shut case Con{ch, rest}: +code = Char.to_u32(ch) closes(rest, Bool.and(Bool.not(esc), U32.is_eq(code, 92)), Bool.and(Bool.not(esc), U32.is_eq(code, 34))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.to_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq