core/helpers/StringHelper.php
public static function contains($needle, $haystack, $strict = false)
    {
        $needles = (array) $needle;
        
        $state = false;
        
        foreach ($needles as $item) {
            $state = (strpos($haystack, $item) !== false);
            
            if ($strict && !$state) {
                return false;
            }
            
            if (!$strict && $state) {
                return true;
            }
        }

        return $state;
    }
public static function contains($needle, $haystack, $strict = false)
    {
        $needles = (array) $needle;
        
        $state = false;
        
        foreach ($needles as $item) {
            $state = (strpos($haystack, $item) !== false);
            
            if ($strict && !$state) {
                return false;
            }
            
            if (!$strict && $state) {
                return true;
            }
        }

        return $state;
    }
public static function contains ( $ needle , $ haystack , $ strict = false ) { $ needles = ( array ) $ needle ; $ state = false ; foreach ( $ needles as $ item ) { $ state = ( strpos ( $ haystack , $ item ) !== false ) ; if ( $ strict && ! $ state ) { return false ; } if ( ! $ strict && $ state ) { return true ; } } return $ state ; }
Check whether a char or word exists in a string or not.

This method is case sensitive. The need can be an array with multiple chars or words who
are going to look up in the haystack string.

If an array of needle words is provided the $strict parameter defines whether all need keys must be found
in the string to get the `true` response or if just one of the keys are found the response is already `true`.

@param string|array $needle The char or word to find in the $haystack. Can be an array to multi find words or char in the string.
@param string $haystack The haystack where the $needle string should be looked  up.
@param boolean $strict If an array of needles is provided the $strict parameter defines whether all keys must be found ($strict = true) or just one result must be found ($strict = false).
@return boolean If an array of values is provided the response may change depending on $findAll.
Check whether a char or word exists in a string or not .