Simplicty and flexibility!


Function::String

StringReplace
StringReplace(StringToReplaceIn,StringToReplace,StringToReplaceWith)
StringReplace("This is a test","a test","brilliant!") -- result: This is brilliant.
StringToReplace(MyTextField, ToReplace,ReplaceWith)
retval := StringToReplace(MyTextField, ToReplace,R


To replace all occurrence of a text in a string with another text.

Can be used to replace names, codes, spelling mistakes etc in a text field.

Parameters


StringToReplaceIn:

This is the string that you want to replace text in. "This is a test".

StringToReplace:

This is the string you want to replace. "a test"

StringToReplaceWith:

This is the string you want to change it to: "brilliant!"

Returns/Result


String(255): The complete string with the changes.

Examples


Reference

A useful little function.

If you did a mistake, have changed name, address etc, why not simply find and replace.

Simple find and replace...

text StringRepace(StringToReplaceIn,StringToReplace,StringToReplaceWith)

What more to say, if you don't see the use, you never will..;-)

See Also



MemoReplace()

MemoMemoReplace()

On the forum about StringReplace

StringReplace(), CHR(), LastC() and ConCat() used to reformat number to export number

Download Sample This is quite straightforward but as it again showcase some of our new functions we'll happy to showcase it. We simply added th...

Product: Dataease [{8}]FIVE. Written by DataEase 28/02/15 at 15:00:40

StringReplace of forbidden characters like * and " etc.

How can i replace a " in StringReplace ?...

Product: Dataease [{8}]FIVE. Written by Bert 02/07/15 at 08:46:34

StringReplace stupport StringEscape

Simples ;-)All string functions in DataEase 8.5 support StringEscape.This means that y...

Product: Dataease [{8}]FIVE. Written by DataEase 02/07/15 at 09:15:35

On the blog about StringReplace

New Function 8 - StringReplace() - Replace a string inside another string. (Ver. 8.0.0.1021)

A useful little function. If you did a mistake, have changed name, address etc, why not simply find and replace. Simple find and replace... text StringReplace(StringToReplaceIn,StringToReplace,StringToReplaceWith) ...

Product: Dataease [{8}]FIVE. Written by DataEase 10/11/11 at 11:25:50


dg3_HelpView