加载来自网络的文字就像 value1 = 1,value2 = 2,value3 = 3 bla bla bla
我实际上想获得声明变量的值是否可能?
//loaded from web address
value1=1,value2=2,value3=3
Procedure getvarvaules;
var
value1:string ='1';
value2:string ='2';
value3:string ='3';
begin
end;
答案 0 :(得分:4)
使用TStringList:
var
lst: TStringList;
begin
lst := TStringList.Create;
try
lst.Commatext := { variable containing the webresult };
value1 := lst.Values['value1'];
value2 := lst.Values['value2'];
value3 := lst.Values['value3'];
finally
lst.Free;
end;
end;