Mam problem z rozdzieleniem tekstu, w label1 caption mam tekst np. 25 / 25
i teraz jak to rozdzielic zeby było osobno 25, /, 25?
0
0
enginer: pudlo
poszukaj w helpie opisu funcji pos() i copy()
albo:
0
Albo poczytaj o funkcjach: AnsiLeftStr, AnsiEndsStr :)
Czasami też się przydają :)
0
var
S: TStringList
begin
S := TStringList.Create
try
ExtractStrings([' '], [], label1.caption, S);
// S[0] = '25'
// S[1] = '/'
// S[2] = '25'
finally
S.Free
end;
end;
0
Albo:
var
S: TStringList;
begin
S := TStringList.Create;
S.Delimiter := ' ';
S.DelimitedText := label1.caption;
S.Free;
end;