String Replace


Posted by p12113 Ross Mason on March 14, 2001 at 22:11:24:

How can I make string replace work?
I built this function to take soft carriage returns out of a string, but it will not compile. I get this error [Error] unMain.pas(190): '(' expected but ')' found

function TfrmMain.ReplaceSoft(s: String): String;
type
TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
var
sRet :String ;
sOld : String ;
sNew : String ;
begin
sOld := chr(141)+chr(10);
sNew := ' ' ;
sRet := StringReplace(S, sOld, sNew,TReplaceFlags );
Result := sRet ;
end;

Any ideas?

Thanks for the help.


Related Articles and Replies: