docs

Home Getting Started Browse by Category Class Methods Low-Level API

GetString

Reads a string from a TOML key path, using a supplied default when the key is absent.

Clarion class declaration

GetString PROCEDURE(STRING pKeyPath,STRING pDefault,*CSTRING pValue),LONG

Purpose

Reads a string from a TOML key path, using a supplied default when the key is absent.

Parameters

Parameter Type Description
pKeyPath STRING Dotted or indexed TOML key path.
pDefault STRING Value returned when the TOML key or array element is absent.
pValue *CSTRING Output variable that receives the requested value.

Return value

Returns ProTOML:OK on success or a negative ProTOML error code. Call GetLastError for readable details.

Example (Clarion)

AppName CSTRING(128)
RetCode LONG

CODE
RetCode = Toml.GetString('application.name','Untitled',AppName)

Notes

Home Getting Started Browse by Category Class Methods Low-Level API