-2
Good Night, I have a memo that takes several strings and in many lines, I want to delete the lines that contain less or more than seven(7) numbers ,leaving only the lines that have exactly seven(7) numbers I’m trying with a code only that every Memo is erased.
var
cont, N: Integer;
begin
cont:= 0;
N := Length(GetStrNumber(Memo2.Lines.Strings[cont])); //N = quantidade de
//números na linha no Memo
while (cont <= Memo2.Lines.Count - 1) do
if N <> 7 then //Se N é diferente de 7 então apagar a linha
begin
Memo2.Lines.Delete(cont)
end
else
Inc(cont);