hi,
[EDIT]Hatte das mit dem NON-
VCL überlesen... Hier einmal überarbeitet
[/EDIT]
Delphi-Quellcode:
unit Unit2;
interface
type
TStringArray =
array of string;
procedure GetNums(AString:
string;
var AStrArray: TStringArray);
implementation
procedure GetNums(AString:
string;
var AStrArray: TStringArray);
var
ndx: Integer;
sHelp:
string;
begin
sHelp := '
';
SetLength(AStrArray, 0);
for ndx := 1
to Length(AString)
do
begin
if (AString[ndx]
in ['
0'..'
9'])
then
begin
sHelp := sHelp + AString[ndx];
end
else if (sHelp <> '
')
then
begin
SetLength(AStrArray, Length(AStrArray)+1);
AStrArray[High(AStrArray)] := sHelp;
sHelp := '
';
end;
end;
// Edit Ihr habt ja recht.
if (sHelp <> '
')
then
begin
SetLength(AStrArray, Length(AStrArray)+1);
AStrArray[High(AStrArray)] := sHelp;
sHelp := '
';
end;
end;
end.