getStringArrayS#
Fully qualified name: carb::settings::getStringArrayS
Defined in carb/settings/SettingsUtils.h
- inline std::vector<std::string> carb::settings::getStringArrayS(
- ISettings *settings,
- carb::cpp::string_view path,
- carb::cpp::string_view defaultValue = "",
A helper function for reading a setting value that is an array of string values as
std::vector<std::string>
.See also
getStringArrayFromItemValues() for a function that handles values of mixed or non-string types.
- Parameters:
settings – The acquired ISettings interface.
path – The setting key path. If this path does not exist or is not an array, an empty vector will be returned.
defaultValue – The value that is returned for each array item if the array item is not a string value.
- Returns:
a
std::vector<std::string>
of all string array elements. If the value atpath
does not exist or is not an array type, an empty vector is returned. Otherwise, a vector is returned with the number of elements matching the number of elements in the value atpath
(as determined via ISettings::getArrayLengthS). Any array elements that are not string types will instead bedefaultValue
.