def text.case.found

ezsys@0.1.0.0 · src/str.bend:263

import ezsys@0.1.0.0/src/str.bend as Str
import Base

263# this entry's text, or the rest's
264def text.case.found(
265  hit: Bool,
266  to: String,
267  rest: Unit -> Maybe<&2, String>
268) -> Maybe<&2, String>:
269  match hit:
270    case True{}:
271      Some{to}
272    case False{}:
273      rest(Unit{})

Uses (4)

Used by (1)