def cut_error

cswap-bend-cli@0.1.0.0 · rpcmsg.bend:196

import cswap-bend-cli@0.1.0.0/rpcmsg.bend as Rpcmsg
import Base

196# The text after the first `error: ` in `s`, else `whole`.
197def cut_error(s: String, +whole: String) -> String:
198  match s:
199    case SNil{}:
200      whole
201    case SCon{+c, +t}:
202      cut_pick(String.starts_with(s, "error: "), String.drop(s, 7n), cut_error(t, whole))

Uses (4)

Used by (1)