Go to the first, previous, next, last section, table of contents.


]replaceSubstrings

Function: ]replaceSubstrings { [ "x" "y" | "xz" ]replaceSubstrings -> "yz" }
file: job.t
package: muf
status: alpha

The ]replaceSubstrings function makes a series of substitutions in a given string. It accepts a string to operate on and a block of old-new stringpairs, and returns a string on which the indicated substitutions have been performed:

Stack:
[ "0" "a"   "1" "b" | "0110" ]replaceSubstrings
Stack: "abba"
pop [ "x" "xx" | "xx"  ]replaceSubstrings
Stack: "xxxx"
pop [ "x" "" | "xyzzy" ]replaceSubstrings
Stack: "yzzy"
pop [ "" "x" | "xyzzy" ]replaceSubstrings

**** Sorry: ]replaceSubstrings: Empty template string!


Go to the first, previous, next, last section, table of contents.