Core.int.of: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/core.bend as Core Lines 73-77 of yaml-for-bend@0.1.1.0/core.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/core.bend&start_line=73&end_line=77 import Base import yaml-for-bend@0.1.1.0/re.bend as R import yaml-for-bend@0.1.1.0/num.bend as N # An integer's decimal text, if +s+ is one. def int.of(+s: String) -> Maybe<&2, String>: when(Maybe<&2, String>, R.matches(dec.pat(), s), u => Some{N.int.text(is_neg(s), unsigned(s), 10n)}, u => when(Maybe<&2, String>, R.matches(oct.pat(), s), u => Some{N.int.text(False{}, String.drop(s, 2n), 8n)}, u => when(Maybe<&2, String>, R.matches(hex.pat(), s), u => Some{N.int.text(False{}, String.drop(s, 2n), 16n)}, u => None{}))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=dec.pat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=hex.pat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=is_neg https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=oct.pat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=unsigned https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/core.bend&name=when https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/num.bend&name=int.text https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/re.bend&name=matches