ReplaceChStr Function
Returns the String with all occurrences of OldCh character replaced with NewCh character.

Unit
QESBPCSConvert

Declaration
Function ReplaceChStr(const S: string; const OldCh, NewCh: Char): string;

Parameters
the String to process.
OldCh the character to look for.
NewCh the character to replace with.

Category
Extra String Handling Routines

Implementation

function ReplaceChStr (const S: string; const OldCh, NewCh: Char): string;
var
     I: LongWord;
begin
     Result := S;
     if OldCh = NewCh then
          Exit;
     for I := 1 to Length (S) do
          if S [I] = OldCh then
               Result [I] := NewCh;
End;


HTML generated by Time2HELP
http://www.time2help.com