split*-when ( ... seq quot: ( ... elt -- ... ? ) -- ... pieces )


Vocabulary
splitting.extras

Inputs
seqa sequence
quota quotation with stack effect ( ... elt -- ... ? )


Outputs
piecesa new array


Word description
A variant of split-when that includes the elements along which the sequence was split.

Examples
USING: ascii kernel prettyprint splitting.extras ; "hello,world-how.are:you" [ letter? not ] split*-when .
{ "hello" "," "world" "-" "how" "." "are" ":" "you" }


See also
split*-when-slice

Definition


: split*-when
( ... seq quot: ( ... elt -- ... ? ) -- ... pieces )
[ subseq ] (split*) ; inline