[Lazarus] how to remove comments (TSynIniSyn)?

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Aug 21 22:15:53 CEST 2013


On Wed, 21 Aug 2013 15:22:16 -0300
Junior <lazarus.linux at gmail.com> wrote:

> hello all :)
> 
> I would like to open a file .ini in one TSynEdit removing all existing 
> comments in this file.
> 
> Component TSynIniSyn Already added to project.

There are various definitions what a comment is in an ini file.

If you want to delete all lines starting with a semicolon:

for i:=SynEdit1.Lines.Count-1 downto 0 do
  if LeftStr(SynEdit1.Lines[i],1)=';' then
    SynEdit1.Lines.Delete(i);


Mattias




More information about the Lazarus mailing list