如何在Inno Setup Pascal脚本中迭代MULTI_SZ字符串?
例如超过RegQueryMultiStringValue
答案 0 :(得分:3)
以下是执行此操作的代码:
var
I,StartPos:Integer;
MultiSzStr,Element:String;
...
StartPos := 1;
for I:= 1 to Length(MultiSzStr) do
begin
if MultiSzStr[I] = #0 then
begin
Element := Copy(MultiSzStr, StartPos, I - StartPos);
{ do something with the element }
StartPos := I + 1;
end;
end;