JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

peg/replace-all

core-api


    cfunction
    src/core/peg.c on line 1967, column 1

    (peg/replace-all peg subst text &opt start & args)

    Replace all matches 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.


1 exampleSign in to add an example
Loading...
(peg/replace-all '(set "aiou") "e" "The quick brown fox jumps over the lazy dog")
# returns The qeeck brewn fex jemps ever the lezy deg
pepePlayground