company logo

Value :: contains - Does property contain text

The function checks, whether the value contains the text passed in sSearchWord. The function returns true, when the text has been found. When the instance is a complex instance, the function searches in all text attributes (and MEMO properties) in the selected instance. Otherwise, data in the current value is checked.

This version supports simple string expressions as "string", "*string", "string*" and "*string*". When not beginning or terminating the search string with an '*', the text must be at the beginning or at the end of a word. Searching for "string" will search for whole words, only.

In order to perform case sensitive search, true has to be passed in bCaseSensitive.

In order to replace control sequences in search string coded as character strings (as '\n' or '\t') into corresponding control characters, conv_opt 1 or true has to be passed.

For extracting plain text from HTML text data before searching, conv_opt 2 has to be passed.

In order to perform conversions for text and for search string, conv_opt must be set to 3.

Return value:  Success ( bool  )

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

Implementation details

bool Value  :: contains ( odaba::String &sSearchWord, bool bCaseSensitive, bool bConvert )
  • sSearchWord - Search word
  • bCaseSensitive - Case sensitive option

    The option indicates case sensitive data in text (true)

  • bConvert - Conversion option

    In order to allow data conversion, the value must be set to true. In order to suppress data conversion false should be passed.