var
n : Integer;
NovoTexto : String;
begin
NovoTexto := '';
for n := 1 to length(texto) do
begin
if copy(texto, n,1) <> Chr(39) then
NovoTexto := NovoTexto + copy(Texto, n,1)
else
NovoTexto := NovoTexto + ' ';
end;
Result:=NovoTexto;
end;
procedure TForm1.Button1Click(Sender: TObject);
var texto : string;
begin
texto := 'teste'+Chr(39)+'d';
ShowMessage(texto); //mostra o texto com a aspa
texto := RetiraAspaSimples(texto); //utiliza a funcao retirar as aspas e substitui por espaco embranco
ShowMessage(texto); // mostra o testo sem as aspa
end;