company logo

Value :: searchString - Search string in property

The function searches for the text passed in sString in the text value. When no instance is selected in the value handle or the value is not a text property, the function throws an exception.

Return value:  Start position in string ( int32  )

The start position begins with 0 at the beginning of the string area.

Implementation details

int32 Value  :: searchString ( odaba::String &sString, int32 iStartPosition, bool bCaseSensitive )

Searching starts in at character position passed in iStartPosition. Passing false in bCaseSensitive performs a case insensitive search. The function returns the character position (relative 0) of first occurrence of sString in the text. When the text could not be found, the function returns -1.

Notes:

Depending on text encoding, the character position may differ from the byte position in the string.

  • sString - String value
  • iStartPosition - Start position in string

    The start position begins with 0 at the beginning of the string area.

  • bCaseSensitive - Case sensitive option

    The option indicates case sensitive data in text (true)