company logo

String :: contains - Search for a String occurence

The function returns true if the String object contains an occurrence of the string cString; otherwise returns false.

The function provides a sort of shortcut for indexOf(cString)>=0.


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. Search for a String occurence
    bool String  :: contains ( odaba::String &cString, bool bCaseSensitive )

    This implementation of contains() can be used for a case insensitive search. If bCaseSensitive is true, the search is case sensitive; otherwise the search is case insensitive.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

    • bCaseSensitive - Case sensitive option

      The option indicates case sensitive data in text (true)

  2. to list
  3. Search for a String occurence
    bool String  :: contains ( odaba::String &cString )

    Calling the default implementation of contains the search is case sensitive.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  4. to list