MiniINI can only have single comment character, but not all INI files use semicolon (';') for comments. For instance, the '#' character is commonly used for this purpose. Fortunately, it's possible to set the character to specify comments.

To do this, we use the INISetComment function. It takes one argument: the comment character. INISetComment returns true if the comment character was set successfully, false otherwise. (Other characters that have special meanings in an ini file, such as '[' or '\n' can't be used to specify comments.)

You can also change the name/value separator character ('=' by default), using the INISetSeparator function. This function works just like INISetComment: it takes a character to use as the separator, returns true if it was set successfully, false otherwise.

NOTE: INISetComment and INISetSeparator will only affect files opened after they were called!

Example:

INISetComment('#');
INISetSeparator(':');

This will make MiniINI parse anything between '#' and end of line as a comment (i.e. ignore it) and separate tag names and values by the ':' character.


Last update: 07-07-2010