std.replaceall()

Replaces all occurrences of the literal string pattern in string s with replacement. If no matches are found, no replacements are made. If pattern is the empty string, the original string s is returned.

Once a replacement is made, substitutions continue from the end of the replaced buffer. Therefore, std.replace("aaa", "a", "aa") will return a string "aaaa" instead of recursing indefinitely.

Format

STRING
std.replaceall(STRING s, STRING pattern STRING replacement)

Examples

1
set req.url = std.replace_all(req.url, "+", "%2520"); # "+" is not a special character