code: 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;
          }
      }
docs: Returns true if the string contains $pattern.
  
  @param  string $pattern
  @param bool $regexp
  @return bool