def name.ok
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
596# whether a character may stand in a tool name: an ASCII letter or digit,
597# `_` or `-`
598def name.ok(+cp: U32) -> Bool:
599 Bool.or(Bool.and(U32.is_le(65, cp), U32.is_le(cp, 90)),
600 Bool.or(Bool.and(U32.is_le(97, cp), U32.is_le(cp, 122)),
601 Bool.or(Bool.and(U32.is_le(48, cp), U32.is_le(cp, 57)),
602 Bool.or(U32.is_eq(cp, 95), U32.is_eq(cp, 45)))))