replace ( seq old new -- new-seq )
Factor handbook » The language » Collections » Sequence operations » Splitting sequences

Prev:split-lines ( seq -- seq' )


Vocabulary
splitting

Inputs
seqa sequence
olda sequence
newa sequence


Outputs
new-seqa sequence


Word description
Replaces every occurrence of old with new in the seq.

Examples
USING: io splitting ; "cool example is cool" "cool" "silly" replace print
silly example is silly


Definition