getStringFromItemValueAt#

Fully qualified name: carb::settings::getStringFromItemValueAt

Defined in carb/settings/SettingsUtils.h

inline omni::string carb::settings::getStringFromItemValueAt(
const ISettings *settings,
cpp::string_view path,
size_t index,
cpp::string_view defaultValue = {},
)#

Retrieves a string from an array setting key for simplicity.

Parameters:
  • settings – The acquired ISettings interface.

  • path – The setting key path to retrieve (must be an array or defaultValue will be returned).

  • index – The array index to retrieve.

  • defaultValue – The value that is returned if path is not a valid path, not an array, or the index does not exist.

Returns:

A string representation of the item value, or defaultValue.