The includes() method determines whether one string may be found within another string,
returning true or false as appropriate.

@param string $searchString
@param int $position
@return bool
5917
public function includes($searchString, $position = 0)
    {
        if ($position + strlen($searchString) > $this->length()) {
            return false;
        }

        return $this->indexOf($searchString, $position) !== -1;
    }
66596
public function search($searchStr)
    {
        $conditions = [];

        $parsedStr = $this->parseSearchStr($searchStr);

        foreach ($this->searchable() as $column) {
            $conditions[] = $column.' like "'.$parsedStr.'"';
        }

        $method = $this->searchOperator.'Raw';
        $query  = $this->query()->{$method}('('.join(' OR ', $conditions).')');

        if ($this->sort) {
            $this->applySort($query, $searchStr);
        }

        return $query;
    }
535410
private static boolean contains(Key[] haystack, Key needle) {
	for (int i = 0; i < haystack.length; i++) {
	    if (haystack[i].equalsIgnoreCase(needle)) return true;
	}
	return false;
    }
670031
protected function createSearchString($indexName, $searchString)
    {
        $search = '(' . $indexName . '=' . $searchString . ')';
        $search = str_replace(' and ', ' and ' . $indexName . '=', $search);
        $search = str_replace(' not ', ' not ' . $indexName . '=', $search);
        $search = str_replace(' or ', ' or ' . $indexName . '=', $search);

        return $search;
    }
382104
def include? position
      position = Position.normalize(position)
      contain?(position) && !(position.line == start.line && position.character == start.character)
    end
742125
public static function stringBeginsWith($haystack, $needle)
    {
        if (!empty($needle) && strncmp($haystack, $needle, strlen($needle)) === 0) {
            return true;
        }

        return false;
    }
490719
public function includes(Position $position): bool
    {
        return $this->start->compare($position) <= 0 && $this->end->compare($position) >= 0;
    }
25073
public function createConditionalAvailabilitySkuSearchQuery(?string $searchString): QueryInterface
    {
        $searchQuery = $this->getConditionalAvailabilitySkuSearchQueryPlugin();
        if ($searchQuery instanceof SearchStringSetterInterface) {
            $searchQuery->setSearchString($searchString);
        }

        return $searchQuery;
    }
789567
public static function ensureLeft($string, $search, $encoding = null)
    {
        if (static::startsWith($string, $search, true, $encoding)) {
            return $string;
        }

        return $search . $string;
    }
1234135
private boolean matchesIncludes( final String fileName )
    {
        if( m_includes.length == 0 )
        {
            return true;
        }
        for( Pattern include : m_includes )
        {
            if( include.matcher( fileName ).matches() )
            {
                return true;
            }
        }
        return false;
    }
160903
public function find( $search ) {

		if ( ! is_array( $search ) ) {
			$search = (array) $search;
		}

		foreach ( $search as $val ) {
			if ( $this->fulltextSearchInPost( $val ) !== false ) {
				return true;
			}
			if ( $this->fulltextSearchInMeta( $val ) !== false ) {
				return true;
			}
		}

		return false;
	}
324604
public static function contains($haystack, $needle, $ignoreCase = false)
    {
        if ($ignoreCase) {
            $needle = strtolower($needle);
            $haystack = strtolower($haystack);
        }
        $pos = strpos($haystack, $needle);

        return !($pos === false);
    }
455020
public function includes($searchElement, $fromIndex = 0)
    {
        return in_array($searchElement, $this->slice($fromIndex)->getArrayCopy(), true);
    }
489141
function contains(origin, search, start) {
  'use strict';
  if (typeof start !== 'number') {
    start = 0;
  }
  if (start + search.length > origin.length) {
    return false;
  } else {
    return origin.indexOf(search, start) !== -1;
  }
}
733126
protected function doInsertStringBeforePosition(string $string, string $insertStr, int $position): string
    {
        return \substr($string, 0, $position) . $insertStr . \substr($string, $position);
    }
138235
public static function contains($haystack, $needle)
    {
        foreach ((array)$needle as $n) {
            if (strpos($haystack, $n) !== false) {
                return true;
            }
        }

        return false;
    }
1097621
public static boolean isIncluded(String filename, List<String> includes) {
        logger.debug("filename = [{}], includes = [{}]", filename, includes);

        // No rules ? Fine, we index everything
        if (includes == null || includes.isEmpty()) {
            logger.trace("no include rules");
            return true;
        }

        for (String include : includes) {
            String regex = include.toLowerCase().replace("?", ".?").replace("*", ".*?");
            logger.trace("regex is [{}]", regex);
            if (filename.toLowerCase().matches(regex)) {
                logger.trace("does match include regex");
                return true;
            }
        }

        logger.trace("does not match any include pattern");
        return false;
    }