TeamSpeak3/Helper/StringHelper.php
public function contains($pattern, $regexp = false)
    {
        if (empty($pattern)) {
            return true;
        }

        if ($regexp) {
            return (preg_match("/" . $pattern . "/i", $this->string)) ? true : false;
        } else {
            return (stristr($this->string, $pattern) !== false) ? true : false;
        }
    }
public function contains($pattern, $regexp = false)
    {
        if (empty($pattern)) {
            return true;
        }

        if ($regexp) {
            return (preg_match("/" . $pattern . "/i", $this->string)) ? true : false;
        } else {
            return (stristr($this->string, $pattern) !== false) ? true : false;
        }
    }
Returns true if the string contains $pattern.

@param  string $pattern
@param bool $regexp
@return bool