def Carrier.named
bend-trace-context@0.2.0.0 · trace_context.bend:2718
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base
2718
2719
2720
2721
2722
2723
2724def Carrier.named(name: String, text: String) -> Bool:
2725 match name text:
2726 case SNil{} SNil{}:
2727 True{}
2728 case SNil{} SCon{char, rest}:
2729 False{}
2730 case SCon{expected, more} SNil{}:
2731 False{}
2732 case SCon{expected, more} SCon{char, rest}:
2733 Bool.and(Char.is_eq(Char.to_lower(char), expected), Carrier.named(more, rest))