cfunction
src/core/peg.c on line 1976 , column 1
(peg/replace peg subst text &opt start & args )
Replace first match of `peg` in `text` with `subst` , returning a
new buffer. The peg does not need to make captures to do
replacement. If `subst` is a function , it will be called with the
matching text followed by any captures. If no matches are found ,
returns the input string in a new buffer.
(peg/replace ~(sequence :s (thru "t" ))
" duck"
"smiling cat sleeps" )
# => @"smiling duck sleeps"