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;
TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
sRet :String ;
sOld : String ;
sNew : String ;
sOld := chr(141)+chr(10);
sNew := ' ' ;
sRet := StringReplace(S, sOld, sNew,TReplaceFlags );
Result := sRet ;
Thanks for the help.
Related Articles and Replies: