Replace Text

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 replacetext
  • delphi replace
  • replacetext delphi
  • replaceall delphi
  • comandos delphi replace text
  • replacing text delphi
  • delphi search replace txt
  • delphi find and replace
  • delphi 3 search and replace text in file
  • вудзрш куздфсуфдд
This entry was posted in Strings. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string 9rGX0m to the field below: