company logo

Option :: equals - Test option

The function checks, whether the option value is the same as the value passed in sValue or not. When passing true in bCaseSensitive , values are checked case sensitive.

The function returns true , when values match and false otherwise.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false .

Implementation overview

Implementation details

  1. Compare case sensitive
    bool Option  :: equals ( odaba::String &sValue, bool bCaseSensitive )

    The function compares the option value with the string value passed in sValue . The value is compares case sensitive, when passing true in bCaseSensitive .

    • sValue - String value
    • bCaseSensitive - Case sensitive option

      The option indicates case sensitive data in text ( true )

  2. to list
  3. Compare with integer
    bool Option  :: equals ( int32 iValue )

    The function compares the option value with the integer passed in iValue .

    Notes:

    Conversion from option value to integer uses standard conversion, which will stop at the first non-numeric caracter in the option value. Thus, an option value 1/5 would result in 1.

    • iValue - Integer value

      The value is passed as platform independent 32-bit integer value.

  4. to list
  5. Compare with string value
    bool Option  :: equals ( odaba::String &sValue )

    The function compares the option value with the string value passed in sValue . Values are is compared case sensitive. In order to perform case insensitive comparison, equals() might be called.

    • sValue - String value
  6. to list