String.Replace

Syntax

Replace(Source: String; OldValue: String; NewValue: String): String;

Parameters

Source - source string.

OldValue - substring, which should be replaced with the new value.

NewValue - replace substring.

Description

The Replace method searches for occurrence of the substring passed by the OldValue parameter, to the Source string and replaces it with the value passed by the NewValue parameter.

Example

Sub Main;

Var

s, s1: String;

Begin

s := "abcdcefc";

s1 := String.Replace(s, "c", "*");

End Sub Main;

After executing the example the "s1" variable will contain the ab*d*ef* value.

See also:

String