Openapi.sanitize: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/openapi.bend as Openapi Lines 611-618 of ezmcp@0.1.0.0/src/openapi.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/openapi.bend&start_line=611&end_line=618 import Base # a string as a tool name: each character that may not stand in one # (`name.ok`) as `_`, one for one def sanitize(text: String) -> String: match text: case SNil{}: SNil{} case SCon{Chr{+cp}, rest}: SCon{name.char(name.ok(cp), cp), sanitize(rest)} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=name.char https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=name.ok