def split.if

bend-kit-bytes@0.3.3.0 · bytes.bend:533

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base

533def split.if(whole: Bool, +len: U32, buf: Array<U32>, +sep: String, +m: U32) -> List<&1, Bytes>:
534  match whole:
535    case True{}:
536      Con{Bytes{len, buf}, Nil{}}
537    case False{}:
538      split.run(len, m, split.scan(U32.to_nat((len - m + 1 : U32)), at(buf, sep, 0), sep, m, 0, 0, Nil{}))

Uses (12)

Used by (1)