TraceContext.Carrier.named: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 2718-2733 of bend-trace-context@0.2.0.0/trace_context.bend: https://jend.leeeet.dev/read.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&start_line=2718&end_line=2733 import Base # Whether `text` is `name` without regard to ASCII case (W3C 3.2.1 and # 3.3.1): each character of `text`, with the letters A to Z lowered, is the # character of `name` at its position. Other characters are compared as they # are, so a name that differs by more than ASCII case names another field. # `name` is written in lowercase, and the comparison follows it, so a long # field name is not read past it. def Carrier.named(name: String, text: String) -> Bool: match name text: case SNil{} SNil{}: True{} case SNil{} SCon{char, rest}: False{} case SCon{expected, more} SNil{}: False{} case SCon{expected, more} SCon{char, rest}: Bool.and(Char.is_eq(Char.to_lower(char), expected), Carrier.named(more, rest)) Uses (5): 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=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.to_lower https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String