ReadString - cIniFile
Reads a string from an INI file
Type: Function
Return Data Type: String
Parameters
| Parameter | Type | Description |
|---|---|---|
| sSection | String | The name of an existing Section. |
| sKey | String | The name of an existing Key. |
| sDefault | String | The value you want returning if the Section or Key does not exist. |
Syntax
Function ReadString String sSection String sKey String sDefault Returns String
Call Example
Get ReadString sSection sKey sDefault to StringVariable
Description
To read a string from an INI file, you must provide the name of the Section and the name of the Key along with a default that you want to return if the Section/Key does not exist. Before reading a string (or performing any operation on the contents of an INI file) you must set the psFileName property.
To check whether a Section or Key exists, use SectionExists and KeyExists, respectively
To see an example of using ReadString, see the sample in cIniFile
Return Value
The string stored in the Section/Key.