String :: replaceOptions - Replace option variables in a string
The function replaces all option variables in a string by the option values currently set. Option variables not set will be removed from the string. Option variables set in the string have to be enclosed in %...%. Option variables have to consist of ASCII characters, only. Strings enclosed in %...% containing special characters are not considered as option variables.
Implementation overview
- Replace all options in the string
String :: replaceOptions (  ) - Replace options defined on option hierarchy level (sub options)
String :: replaceOptions ( cOptionPath )
Implementation details
-
Replace all options in the string
odaba::String & String  :: replaceOptions (  )
Option variables referenced in the string need to be defined with full path (e.g. %Options.Email.Host% )
// replacing Options.Email.Password
String("my password: %Options.Email.Password%").replaceOptions();
to list
-
Replace options defined on option hierarchy level (sub options)
odaba::String & String  :: replaceOptions ( odaba::String &cOptionPath )
The function replaces options defined as sub options for the option passed in cOption . Option names in the string have to be defined relative to the
// replacing Options.Email.Password
String("my password: %Password%").replaceOptions("Options.Email");
- cOptionPath - - internal feature (not documented)
to list