ReplaceChStr Function |
Unit
QESBPCSConvert
Declaration
Function ReplaceChStr(const S: string; const OldCh, NewCh: Char): string;
Parameters |
S | the String to process. |
OldCh | the character to look for. |
NewCh | the character to replace with. |
Category
Extra String Handling RoutinesImplementation
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; |
|