inside-zbox ( seq Z l r k -- seq Z l r )


Vocabulary
z-algorithm.private

Inputs
seqan object
Zan object
lan object
ran object
kan object


Outputs
seqan object
Zan object
lan object
ran object


Definition


:: inside-zbox ( seq Z l r k -- seq Z l r )
k l - Z nth :> Zk' r k - 1 + :> b seq Z Zk' b <
[ Zk' k Z set-nth l r ] [
seq r 1 + seq b [ tail-slice ] 2bi@ lcp :> q q b +
k Z set-nth k q r +
] if ; inline