Merge()
FUNCTION: merge(<string1>,<string2>,<character>)
This function merges <string1> and <string2>, depending on <character>. If a character in <string1> is the same as <character>, it is replaced by the character in the corresponding position in <string2>. The two strings must be of the same length.
Spaces need to be treated specially. A null character is considered to equal a space, for <character>.
Examples:
> say merge(AB--EF,abcdef,-)
You say, "ABcdEF"
> say merge(AB[space(2)]EF,abcdef,)
You say, "ABcdEF"
Related Topics: splice().