Inserting a line into an .ini file
I have recently taken over (read, been given control unexpectedly) leading a project wherein a NSIS installer is used. I've had code experience before, but this is very different than Java and C based code I know moderately well. My installer uses the following function, allowing me to rewrite lines in an ini file. For example...
WriteINIStr "$INSTDIR\System\Nerf.ini" "Engine.GameEngine" "CacheSizeMegs" "256"
would affect in the ini the line "CacheSizeMegs=256" under the heading "[Engine.GameEngine]".
My first question would be is this function something that came with the language? In other words a native or built in function? I can't seem to find a definition for it in the installer.
My second question is can I insert lines using the same or a similar function? To be more clear, I need it to change a section in the ini from this:
...
[Engine.HUD]
HudMode=0
Crosshair=10
[Card1]
...
to this:
...
[Engine.HUD]
HudMode=0
Crosshair=10
[NerfI.NerfHUD]
CrosshairColor=(R=0,G=160,B=225,A=0)
bAllowCustomCrosshairs=True
[Card1]
...
which involves adding a new header and two lines below it. So I need to know the best way to go about it.
Thanks in advance, and excuse me if my terminology is a bit off, I've only got what I know from previous code experience and what I have managed to self teach myself about this language in the very few hours I've had to tinker with it.