def AaText.starts

bend-osdev-apparmor@0.1.0.0 · text.bend:75

import bend-osdev-apparmor@0.1.0.0/text.bend as Text
import Base

75# xs begins with the string s
76def AaText.starts(xs: List<&2, U32>, s: String) -> Bool:
77  match xs s:
78    case Nil{} SNil{}:
79      True{}
80    case Nil{} SCon{c, t}:
81      False{}
82    case Con{h, t} SNil{}:
83      True{}
84    case Con{h, t} SCon{c, u}:
85      Bool.and(U32.is_eq(h, Char.to_u32(c)), AaText.starts(t, u))

Uses (7)

Used by (6)