A: This uses the sBreakApart() function.
function ReplaceStr(BaseString, ReplaceThis, WithThis: string): string;
var
t: TStringList;
i: integer;
begin
t := TStringList.create;
sBreakApart(BaseString, ReplaceThis, t);
if t.count > 1 then
begin
result := '';
for i := 0 to t.count - 2 do
result := result + t[i] + WithThis;
result := result + t[i + 1];
end
else result := BaseString;
t.free;
end;