MindFusion.Wpf Pack Programmer's Guide
REPLACE

Returns the specified text where the characters at the specified position are replaced with another specified text.

Syntax  Copy Code

REPLACE( Text text, Integer start, Integer count, Text new )  Text

Parameters

text
Required. The original text.
start
Required. The start position of the subtext that should be replaced.
count
Required. The number of characters of the subtext that should be replaced.
new
Required. The text that should replace the characters in text.

Remarks

Returns text, but removes count characters starting at position start, and replaces the removed characters with new. The character positions in the text begin at 1.

If start or count are not integer, they are automatically truncated. If start is less than 1, the function returns the #VALUE! error value. If start is greater than the length of the text, the new text is appended at the end. If count goes beyond the end of the text, the function removes all characters from start until the end of the text.

Example

Formula  Copy Code

=REPLACE("Mr. Brown is here",5,5,"O'Donel")

See Also

Function Reference
LEFT Function
RIGHT Function
MID Function
SEARCH Function
SUBSTITUTE Function
TRIM Function