Ops.glob_chars: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/domain/architecture/system/deployment/azure/ops.bend as Ops Lines 62-85 of near-v-framework@0.4.0.0/domain/architecture/system/deployment/azure/ops.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/domain/architecture/system/deployment/azure/ops.bend&start_line=62&end_line=85 import Base # ---- permissions ---- # ARM patterns use '*' for zero or more characters; matching is case insensitive. def glob_chars(+ps: List<&2, Char>, +vs: List<&2, Char>) -> Bool: match ps: case []: match vs: case []: True{} case _ <> _: False{} case p <> rest: match p: case '*': match vs: case []: glob_chars(rest, []) case v <> tail: glob_chars(rest, v <> tail) || glob_chars('*' <> rest, tail) case _: match vs: case []: False{} case v <> tail: Char.is_eq(p, v) && glob_chars(rest, tail) Uses (9): 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.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil