A text replace function for strings.
function ReplaceText(const S,ReplacePiece,ReplaceWith: String):String;
Var
Position: Integer;
TempStr: String;
begin
Position := Pos(ReplacePiece,S);
if Position > 0 then Begin
TempStr := S;
Delete(TempStr,1,Position-1+Length(ReplacePiece));
Result :=
Copy(S,1,Position-1)+ReplaceWith+ReplaceText(TempStr,ReplacePiece,ReplaceWith)
End else Result := S;
end;
Incoming search terms:
- delphi replace
- replacetext delphi
- delphi replace text
- delphi replacetext
- delphi text replace
- delphi string replace
- replace txt delphi
- replace word delphi
- replacetext delphi sample
- replasetext delphi