GetOption
Gets the value of the option entity identified by the name in the option session of the message. "Options" entities include the service-specific runtime options, such as output casing, output data format, and so on.
Syntax
const char* getOption(Message* message,const char* name)
const Uchar* getOption(Message* message,const UChar* name)
Parameters
- Message - the message to which this function applies
- Name- the name whose associated value is to be returned
Results
Returns the value for the name in the "option" property in the message or an empty string if the name does not exist.
Example
const char* value = getOption (message, " OutputCasing");
UChar* value;
// construct 16-bit string
UChar option[32];
char* optionValue="OutputCasing";
u_charsToUChars(optionValue, option, strlen(optionValue));
option [ strlen(optionValue)]=0;
value = getOption(message, option);