Ini Files - Read Multi Lines?

后端 未结 8 2195
旧巷少年郎
旧巷少年郎 2020-12-16 03:40

I am aware that Ini Files are meant for single lines of information, needless to say I am trying to read/write multi lines to and from the Ini - without much success (I alwa

8条回答
  •  独厮守ぢ
    2020-12-16 04:01

    You can use ReadSections method to get all the section names in ini file.

    And perhaps you can use TMemIniFile's ReadSectionValues method to read "multiline values" (ie to read whole section into stringlist). If that doesn't work then perhaps you could use GetStrings to get the content of the ini file and parse it "semy manually" - IIRC it returns you a stringlist with section names where each item's object holds another stringlist with section data.

提交回复
热议问题