Ver Mensaje Individual
  #2  
Antiguo 19-04-2010
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Esta podría ser una opción

Código Delphi [-]
var
  SL: TStringList;

begin
  SL := TStringList.Create;

  try
    SL.Sorted := true;
    SL.Duplicates := dupIgnore;
    SL.LoadFromFile('nombres.txt');
    SL.SaveToFile('nombres.txt');
  finally
    SL.Free;
  end;
end;

Pero tiene el inconveniente que reordena las líneas. Si eso no es problema, entonces te puede servir.

// Saludos
Responder Con Cita