string GetString( string keyName, string defaultValue )

book_4_sparkGenerated
code_blocksInput

Description

The GetString method retrieves a string value associated with a specified key from the metadata. If the key does not exist, it returns a default value provided by the user.

Usage

Use this method when you need to obtain a string value from the metadata. Provide the key name to search for and a default value to return if the key is not found.

Example

// Example usage of GetString method
Editor.MetaData metaData = new Editor.MetaData();
string value = metaData.GetString("exampleKey", "defaultValue");

// If "exampleKey" exists in the metadata, 'value' will be set to its associated string.
// Otherwise, 'value' will be "defaultValue".