def word64.read_s

bendonnect-rpc@0.1.0.0 · src/pb.bend:236

import bendonnect-rpc@0.1.0.0/src/pb.bend as Pb
import Base
import bend-kit-protobuf@0.1.0.0/protobuf.bend as Pb

236# Optional '-' then decimal digits -> two's complement Word64; None when it does not fit in int64.
237def word64.read_s(+s: String) -> Maybe<&2, Pb.Word64>:
238  match s:
239    case SNil{}:
240      None{}
241    case SCon{Chr{+c}, +t}:
242      read_s.go(U32.is_eq(c, 45), c, t)

Uses (6)

Used by (2)