def rfind
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytesimport Base
466# Index of the last match of needle, or None. An empty needle matches at len.
467def rfind(b: Bytes, +needle: String) -> Bytes & Maybe<&2, U32>:
468 Bytes{+len, buf} = b
469 +m = count(needle, 0)
470 find.at(U32.is_lt(len, m), len, buf, needle, (len - m : U32), (len - m : U32), False{})
Uses (10)
Used by (0)
No other definition uses this definition.