DoctorTestCase::inStrRx PHP Method

inStrRx() public method

Returns if $haystack contains $needle. $needle is a regular expression including delimiters and modifiers.
public inStrRx ( string $haystack, string $needle ) : boolean
$haystack string the haystack
$needle string the needle, as a regular expression.
return boolean
    function inStrRx($haystack, $needle)
    {
        $contained = (bool) preg_match($needle, $haystack);
        return $contained;
    }