Check if string has expression markers.

@param string $string
@return bool
496034
protected function hasExpressions(string $string): bool
    {
        foreach (self::STOPS as $symbol) {
            if (strpos($string, $symbol) !== false) {
                return true;
            }
        }

        return false;
    }
866369
public boolean matches(String string) {		
		Matcher matcher = pattern.matcher(string);
		boolean result = matcher.matches();
		return result;		
	}
286545
public static function isEmpty($string)
    {
        if (is_array($string) || is_object($string)) {
            return empty($string);
        }

        $string = (string) $string;

        return !(bool) strlen($string);
    }
668763
public static function containsValidJSON($string)
	{
		try
		{
			$result = json_decode($string);
		}
		catch(\Exception $e)
		{}
		
		if(self::getJSONError() === NULL)
			return true;
		else
			return false;
	}
356097
public function detect($string, $inBlock = false)
    {
        $this->_detectMatch = false;
        if ($this->isOpen) {
            if (self::isMyLine($string)) {
                $this->needsClosing = true;
                return true;
            }

            if (!$this->needsClosing) {
                $this->_currentContent .= $string . "\n";
                return true;
            }

            return false;
        } else if (self::isMyLine($string)) {
            $this->needsClosing = false;
            $this->_programmingLanguage = trim(substr($string, 3));
            return true;
        }
        $this->isOpen = false;
        return false;
    }
1327479
protected function isSoftBool($string)
    {
        if (!is_scalar($string) || $string === null) {
            return false;
        }
        
        $string = (string) $string;
        
        return $string == '0' || $string == '1';
    }
514093
public static function endsWith($string, $ending)
    {
        if (1 === strlen($ending) && !self::isLetterOrDigit($ending)) {
            $ending = '\\' . $ending;
        }

        return (bool)preg_match('|' . $ending . '$|', $string);
    }
221763
public static function isJson($string){

        if(!is_string($string)) return false;

        if(empty($string)) return false;

        json_decode($string);
        return (json_last_error() == JSON_ERROR_NONE);
    }
1101263
public function contains($string): bool
    {
        try {
            Assert::typeOf(['string', __CLASS__], $string);
        } catch (InvalidArgumentException|TypeError $t) {
            return false;
        }

        return mb_strpos($this->data, (string) $string, 0, $this->encoding) !== false;
    }
851546
public static function isJson($string)
    {
        if (strpos($string, "{") !== false) {
            json_decode($string);
            return (json_last_error() == JSON_ERROR_NONE);
        } else {
            return false;
        }
    }
153615
public static function hasScript($string, &$matches = array(), $ifAll = false) {
		return 0 < self::validateByRegExp('/<script(.*?)>([^\x00]*?)<\/script>/', $string, $matches, $ifAll);
	}
1076372
public static function is_xml($string) {
        if (!defined('LIBXML_COMPACT')) {
            throw new \Exception('libxml is required to use Str::is_xml()');
        }

        $internal_errors = libxml_use_internal_errors();
        libxml_use_internal_errors(true);
        $result = simplexml_load_string($string) !== false;
        libxml_use_internal_errors($internal_errors);

        return $result;
    }
173817
public function detect($string, $inBlock = false)
    {
        if (!preg_match($this->regexp, $string, $this->_detectMatch))
            return (0);
        if ($inBlock !== true && ((substr($string, 0, 2) == '**' && strpos($string, '**', 2) !== false) ||
                (substr($string, 0, 2) == '##' && strpos($string, '##', 2) !== false))
        )
            return (0);
        return (1);
    }
52253
public function compareStart($string)
    {
        $lowerString = strtolower($string);
        foreach ($this->tokens as $token) {
            if (strpos($lowerString, strtolower($token)) === 0) {
                $this->found = true;
            }
        }
    }
703269
public static function isJson($string)
    {
        if (!is_string($string) || (is_string($string)
                && substr($string, 0, 1) !== '{'
                && substr($string, 0, 1) !== '[')
        ) {
            return false;
        }
        @json_decode($string);
        return (json_last_error() == JSON_ERROR_NONE);
    }
1102445
protected static function isTwoCharacterComment($string)
    {
        return !empty($string[1]) && (isset($string[1]) && (self::startsWithDoubleDash($string) || self::startsAsBlock($string)));
    }
319974
public function detect($string, $inBlock = false)
    {
        if (!preg_match($this->regexp, $string, $this->_detectMatch)) {
            return (0);
        }

        return (1);
    }