int Ini_GetStringCopy (IniText handle, const char sectionName[], const char tagName[], char **copyOfString);
Obtains a copy of the string associated with tagName in the section identified by sectionName.
You are responsible for freeing the string.
Input | ||
Name | Type | Description |
handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. |
sectionName | const char [] | The section name under which to find the tag/value pair. |
tagName | const char [] | The tag name in the tag/value pair. |
Output | ||
Name | Type | Description |
copyOfString | char ** | The pointer variable into which the address of the dynamically allocated copy of the string associated with tagName is placed.
You are responsible for freeing the string by calling the free function. If an error occurs or the Tag Name cannot be found in the section, the pointer is set to NULL. |
Name | Type | Description | ||
status | integer | Indicates whether a tag/string pair was found with the specified tagName in the section specified by sectionName. A positive return value indicates that a tag/string pair was found. If the string portion of the tag/string pair was empty, such as in tag 1 = "" the string is considered to have been found, and it is the empty string (""). If the tag's value is empty, such as in tag 1 = no tag/value pair is found. A zero indicates that no tag/string pair was found. A negative value indicates an error. If the value is from For this function, the only error you are likely to encounter is:
|