Replace(expression, find, replace[, start[, count[, compare]]])
The compare argument can have the following values:
Constant | Value | Description |
---|---|---|
BinaryCompare | 0 | Performs a binary comparison. |
TextCompare | 1 | Performs a textual comparison. |
Replace returns the following values:
If | Replace returns |
---|---|
expression is zero-length | Zero-length string ("") |
find is zero-length | Copy of expression. |
replace is zero-length | Copy of expression with all occurences of find removed. |
start > Len(expression) | Zero-length string. |
count is 0 | Copy of expression. |
The return value of the Replace function is a string that begins at the position specified by start and concludes at the end of the expression string, with the substitutions made as specified by the find and replace values. It is not a copy of the original string from start to finish.