我使用inifile存储值,我用它来替换文件中的其他值,例如A,BA = B,但是如果我在值B之前有一个空格,那么当读取EG A = B时仍然读取因为只是'B'而不是'B',有没有人知道如何解决这个问题,我使用的是Delphi 7,所以我不能使用StrictDelimiter选项.
procedure ReadIntoVList(const aSection:string;AValueList:TValueListEditor);
var
IniFile:TIniFile;
SL: TStringList;
i: Integer;
begin
SL := TStringList.Create;
IniFile := TIniFile.Create(ChangeFileExt(Application.Exename, '.ini'));
try
IniFile.ReadSectionValues(ASection, SL);
AvalueList.Strings.AddStrings(SL);
finally
StampIniFile.Free;
SL.Free;
end;
end;
Run Code Online (Sandbox Code Playgroud)
谢谢
科林
是否可以使用Delphi在ini文件中使用换行符?
我有一个我想要使用的字符串值,但它需要具有换行功能.我不需要任何其他格式的文本.
我怎样才能做到这一点?
delphi ×2