slice-til-separator-inclusive ( n string tokens -- n' string slice/f ch/f )


Vocabulary
modern.slices

Inputs
nan object
stringan object
tokensan object


Outputs
n'an object
stringan object
slice/fan object
ch/fan object


Definition


:: slice-til-separator-inclusive
( n string tokens -- n' string slice/f ch/f )
n string [ tokens member? ] find-from
[ dup [ 1 + ] when ] dip
:> ( n' ch ) n' string n n' string ?<slice> ch ; inline