ContainsString

The ContainsStringfunction searches for an occurrence of one specified string within another.

Syntax

  Copy codeCopy code
bool ContainsString(
  string sourceString,
  string searchString,
  bool ignoreCase
);

Parameters

sourceString

The string that will be searched.

searchString

The string to search for within sourceString.

ignoreCase

Indicates whether case should be ignored when matching. If true , case is ignored; if false , case is considered.

Return values

Returns true if searchStringwas found within sourceString; false if not.