src/Utilities/Regex.php
public static function contains($haystack, $needle)
    {
        if (1 === strlen($needle) && !self::isLetterOrDigit($needle)) {
            $needle = '\\' . $needle;
        }

        return (bool)preg_match('|.*' . $needle . '.*|', $haystack);
    }
public static function contains($haystack, $needle)
    {
        if (1 === strlen($needle) && !self::isLetterOrDigit($needle)) {
            $needle = '\\' . $needle;
        }

        return (bool)preg_match('|.*' . $needle . '.*|', $haystack);
    }
public static function contains ( $ haystack , $ needle ) { if ( 1 === strlen ( $ needle ) && ! self :: isLetterOrDigit ( $ needle ) ) { $ needle = '\\' . $ needle ; } return ( bool ) preg_match ( '|.*' . $ needle . '.*|' , $ haystack ) ; }
Returns information if one string contains another string

@param string $haystack The string to search in
@param string $needle   The string to be search for
@return bool
Returns information if one string contains another string