def float

cswap-bend-cli@0.1.0.0 · usage/text.bend:94

import cswap-bend-cli@0.1.0.0/usage/text.bend as Text
import Base

94# A JSON number's text as Python prints float(text): `50` -> `50.0`, `5.50` ->
95# `5.5`. None for anything but plain decimals (exponents, signs after the
96# first, text).
97def float(+s: String) -> Maybe<&2, String>:
98  float.sign(String.starts_with(s, "-"), s)

Uses (4)

Used by (8)