procedure Proc1(const s: string; List: Tstrings); var L, i: Integer; t: string; begin List.Clear; L := Length(s); while L > 0 do begin i := Pos('||', s); if i = 0 then i := L; L := L - i - 2; t := Trim(Copy(s, 1, i - 1)); if t <> '' then List.Add(t); end; end;
var s: TStrings; j: Integer; s := TStringList.Create; ExtractStrings(['|'], [], PChar(i), s); for j := 0 to (s.Count - 1) do ShowMessage(s.Strings[j]);
var
L, i: Integer;
t: string;
begin
List.Clear;
L := Length(s);
while L > 0 do
begin
i := Pos('||', s);
if i = 0 then
i := L;
L := L - i - 2; t := Trim(Copy(s, 1, i - 1));
if t <> '' then
List.Add(t);
end;
end;
s2:=copy(i,13,13);
s3:=copy(i,28,10);
s: TStrings;
j: Integer; s := TStringList.Create;
ExtractStrings(['|'], [], PChar(i), s);
for j := 0 to (s.Count - 1) do
ShowMessage(s.Strings[j]);