public function contains($needle, $caseSensitive = null)
    {
        if ('' === $needle) {
            return true;
        }
        if (null === $caseSensitive) {
            $caseSensitive = false;
        }

        if ($caseSensitive) {
            return false !== mb_strpos($this->string(), $needle);
        }

        return false !== mb_stripos($this->string(), $needle);
    }
public function contains($needle, $caseSensitive = null)
    {
        if ('' === $needle) {
            return true;
        }
        if (null === $caseSensitive) {
            $caseSensitive = false;
        }

        if ($caseSensitive) {
            return false !== mb_strpos($this->string(), $needle);
        }

        return false !== mb_stripos($this->string(), $needle);
    }
public function contains ( $ needle , $ caseSensitive = null ) { if ( '' === $ needle ) { return true ; } if ( null === $ caseSensitive ) { $ caseSensitive = false ; } if ( $ caseSensitive ) { return false !== mb_strpos ( $ this -> string ( ) , $ needle ) ; } return false !== mb_stripos ( $ this -> string ( ) , $ needle ) ; }
Determine if this path contains a substring.

@param string       $needle        The substring to search for.
@param boolean|null $caseSensitive True if case sensitive.

@return boolean True if this path contains the substring.
Determine if this path contains a substring .