?tail ( seq end -- newseq ? )
Factor handbook » The language » Collections » Sequence operations » Splitting sequences

Prev:?head-slice ( seq begin -- newseq ? )
Next:?tail-slice ( seq end -- newseq ? )


Vocabulary
splitting

Inputs
seqa sequence
enda sequence


Outputs
newseqa new sequence
?a boolean


Word description
Tests if seq ends with end. If there is a match, outputs the subrange of seq excluding end, and t. If there is no match, outputs seq and f.

Definition