Skip to content

StringReplace ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand. No examples yet — the crosswalk is the reason it has a page.

StringReplace(s, target, replacement): replace every non-overlapping occurrence of target in s, scanning left to right over whole characters. StringReplace(s, target, replacement, count): replace at most count occurrences, from the left. An empty target is an error (the "insert at every boundary" behavior is deliberately not inherited); an empty replacement means deletion. count must be a positive integer. StringReplace(s, pattern, replacement, count?): target may be a regular expression, matched with the host dialect. $1-style templates are NOT expanded in replacement. StringReplace(s, pattern, f, count?): replacement may be a function, called with the same match record StringMatch returns, so each replacement can be computed from its captures.

StringReplace((character | string, character | string, character | string, count: integer?) -> string) & ((character | string, regexp, character | string, count: integer?) -> string) & ((character | string, regexp, function, count: integer?) -> string)as compute-engine declares it
Typed signatures
TypePackageApplies
((character | string, character | string, character | string, count: integer?) -> string) & ((character | string, regexp, character | string, count: integer?) -> string) & ((character | string, regexp, function, count: integer?) -> string)compute-enginealways

Domain: Compute engine

About