function EliminarFormatacao(sTexto:String):String;
var
iPos : Integer;
iTamanho : Integer;
sTextoSemFormato : String;
sCaractere : String;
sCaracMascaras : String;
begin
Result := sTexto;
if sTexto = ''  then
begin
Exit;
end;
sTextoSemFormato := '';
sCaracMascaras := './><_+=[]{}()-$&@*'; //Informe aqui o que vc deseja que
elimine da string
iTamanho := Length(sTexto);
for iPos := 1 to iTamanho do
begin
sCaractere := Copy(sTexto,iPos,1);
if Pos(sCaractere,sCaracMascaras) = 0 then
begin
sTextoSemFormato := sTextoSemFormato + sCaractere;
end; end;
Result := sTextoSemFormato;
end;


[As partes desta mensagem que não continham texto foram removidas]

Responder a