Text.needs_quote: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/text.bend as Text Lines 120-125 of bend-toon-codec@0.1.0.0/src/text.bend: https://jend.leeeet.dev/read.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&start_line=120&end_line=125 import Base # Section 7.2: must this string value be quoted? `d` is the delimiter that # applies (the document delimiter for field values, the active delimiter for # array cells), as a code point. def needs_quote(+s: String, +d: U32) -> Bool: String.is_empty(s) || head_ws(s) || last_ws(s) || reserved(s) || numeric_like(s) || starts_hyphen(s) || has_special(s, d) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=has_special https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=head_ws https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=last_ws https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=numeric_like https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=reserved https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/text.bend&name=starts_hyphen