def in.base

yaml-for-bend@0.1.1.0 · yaml11.bend:139

import yaml-for-bend@0.1.1.0/yaml11.bend as Yaml11
import Base
import yaml-for-bend@0.1.1.0/re.bend as R

139# Whether +s+ is an integer or float in a base other than ten, which takes
140# time that grows with the square of its length to read.
141def in.base(+s: String) -> Bool:
142  Bool.or(Bool.or(R.matches(oct.pat(), s), R.matches(hex.pat(), s)),
143    Bool.or(Bool.or(R.matches(bin.pat(), s), R.matches(sexa.int.pat(), s)), R.matches(sexa.float.pat(), s)))

Uses (9)

Used by (1)