std.replace

STRINGstd.replaceSTRINGsSTRINGtargetSTRINGreplacement

Available inall subroutines.

Replaces the first occurrence of the literal string target in string s with replacement. If target is the empty string, the original string s is returned.

Example

std.replace("abcabc", "b", "") # returns "acabc"

User contributed notes

BETA

Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact support@fastly.com)