I have an application that saves various settings to an INI file. I like for the file to have a blank line between each INI section. Like this:
[Section1]
key1=val1
key2=val2
[Section2]
key1=val 1
My current technique for accomplishing this is to read the entire contents of the file into a string and use:
Replace(strFile, (Chr(10) & "["), (Chr(10) & vbCrLf & "["))
Then I overwrite the file with strFile.
This works fine but it is really offensive to my sense of, um, well I don't like it. Surely there is a more graceful way to do this!
Any ideas?
[Section1]
key1=val1
key2=val2
[Section2]
key1=val 1
My current technique for accomplishing this is to read the entire contents of the file into a string and use:
Replace(strFile, (Chr(10) & "["), (Chr(10) & vbCrLf & "["))
Then I overwrite the file with strFile.
This works fine but it is really offensive to my sense of, um, well I don't like it. Surely there is a more graceful way to do this!
Any ideas?