JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

string/replace-all

core-api


    cfunction
    src/core/string.c on line 412, column 1

    (string/replace-all patt subst str)

    Replace all instances of `patt` with `subst` in the string `str`. 
    Overlapping matches will not be counted, only the first match in 
    such a span will be replaced. If `subst` is a function, it will be 
    called with `patt` once for each match, and should return the 
    actual replacement text to use. Will return the new string if 
    `patt` is found, otherwise returns `str`.


1 exampleSign in to add an example
Loading...
(string/replace-all "e" "o" "feed")
# =>
"food"
sogaiuPlayground