{@inheritdoc}

@param string

@return string
439810
public function relative($url)
    {
        if (!$url || $url == '/') {
            return '.';
        }

        if (strpos($url, '..') !== false) {
            throw new InvalidArgumentException('Double dots in paths are not allowed');
        }

        $baseUrl = $this->getBaseUrl();

        if ($baseUrl && strpos($url, $baseUrl) === 0) {
            return trim(str_replace($baseUrl, '', $url), '/');
        }

        if ($this->startsWithBasePath($url) || !$this->checkFilesystem) {
            return trim(str_replace($this->basePath, '', $url), '/');
        }

        return static::getRelativePath($this->basePath, $url);
    }
1163857
protected function trim(string $string): string
    {
        $string = preg_replace('#\s*\{\{\{\~\s*#is', '{{{', $string);
        $string = preg_replace('#\s*\~\}\}\}\s*#is', '}}}', $string);
        $string = preg_replace('#\s*\{\{\~\s*#is', '{{', $string);
        $string = preg_replace('#\s*\~\}\}\s*#is', '}}', $string);
        return $string;
    }
805156
public static function get(string $name)
    {
        return (isset($_GET[$name]) && $_GET[$name] != '') ? $_GET[$name] : '';
    }
691213
public static function low($string): string
    {
        if (self::isMBString()) {
            return mb_strtolower($string, self::$encoding);
        }

        return strtolower($string); // @codeCoverageIgnore
    }
781597
public static function decode($string)
    {
        if (!$string) {
            return new ArrayObject();
        }

        $array = json_decode($string, true);

        static::checkLastError();

        if (!is_array($array)) {
            $array = [];
        }

        return ArrayObject::make($array);
    }
365243
public function getArrayWhereKeysBeginWith($string)
    {
        if (empty($this->config)) {
            $this->getArray();
        }
        $config = $this->config;

        $thisConfig = array();
        $cleanNameLength = mb_strlen($string);
        $string = mb_strtolower($string);
        foreach ($config as $key => $value) {
            $begin = substr($key, 0, $cleanNameLength);
            if (mb_strtolower($begin) == $string) {
                $thisConfig[$key] = $value;
            }
        }
        return $thisConfig;
    }
1036165
public static function stringToArray($string)
    {
        if (!preg_match("@^{.*?}$@", $string)) {
            return $string;
        }
        $parts = explode(',', substr($string, 1, -1));
        foreach ($parts as &$part) {
            $part = self::stringToArray($part);
        }
        return $parts;
    }
336504
public function txt($string)
	{
		$args  = func_get_args();
		$count = count($args);

		if ($count > 1)
		{
			if ($count == 2 && is_bool($args[1]))
			{
				return $this->translate($string, $args[1]);
			}

			if ($count == 3 && is_bool($args[1]) && is_bool($args[2]))
			{
				return $this->translate($string, $args[1], $args[2]);
			}

			if (is_array($args[$count - 1]))
			{
				$args[0] = $this->translate(
					$string, array_key_exists('jsSafe', $args[$count - 1]) ? $args[$count - 1]['jsSafe'] : false,
					array_key_exists('interpretBackSlashes', $args[$count - 1]) ? $args[$count - 1]['interpretBackSlashes'] : true
				);
			}
			else
			{
				$args[0] = $this->translate($string);
			}
			$args[0] = preg_replace('/\[\[%([0-9]+):[^\]]*\]\]/', '%\1$s', $args[0]);

			return call_user_func_array('sprintf', $args);
		}

		return $this->translate($string);
	}
737283
public static function getValue(string $string)
    {
        if ($string === "TRUE" || $string === "true" || $string === "false" || $string === "FALSE")
            return $string === "TRUE" || $string === "true";
        elseif (is_numeric($string) && preg_match('/\./i', $string))
            return (float)$string;
        elseif (is_numeric($string))
            return (int)$string;
        elseif (Validate::json($string))
            return self::getValueList(json_decode($string, true));
        elseif (is_array($string))
            return self::getValueList($string);

        return (string)$string;
    }
360897
public static function variablize($string)
    {
        $string = self::camelize(self::underscore($string));
        $result = strtolower(substr($string, 0, 1));
        $variable = preg_replace('/\\w/', $result, $string, 1);
        return $variable;
    }
416634
public static function url($string) {

        if(null === $string) {
            return '';
        }

    	if(true === is_numeric($string)) {
    		return $string;
    	}

    	if(false === is_string($string)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($string)), E_USER_ERROR);
		}

        return rawurlencode($string);
    }
1018174
function( string ){
            for( var i = 0; i < string.length; i++ ) string = string.replace( $this.slash.get() + $this.slash.get(), $this.slash.get());

            return string;
        }
334968
public function translate($string)
    {
        $args = func_get_args();
        $translated = array_shift($args);
        $extraParams = $args;
        if (count($extraParams)>0)
        {
            $translated = vsprintf($translated, $extraParams);
        }

        return $translated;
    }
558643
public function get(string $key)
    {
        if (array_key_exists($key, $this->get)) {
            return $this->get[$key];
        }

        return '';
    }
825054
public static function get($string)
    {
        $vars = func_get_args();

        if (array_key_exists($string, self::$strings)) {
            $vars[0] = self::$strings[$string];
            return call_user_func_array('sprintf', $vars);
        }

        return '%%MISSING STRING: ' . $string . '%%';
    }
1071099
private function normalize(string $string): string
    {
        return \str_replace($this->normalizeFrom, $this->normalizeTo, $string);
    }
1241117
function _getName($string)
	{
		if (preg_match('/name=("([^"]*)"|\'([^\']*)\'|[^>\s]*)([^>]*)?>/is', $string, $match)) {
			//preg_match('/name=["\']?([\w\s]*)["\']?[\s>]/i', $string, $match)) { -- did not work as expected
			$val_match = trim($match[1]);
			$val_match = trim($val_match, '"\'');
			unset($string);
			return trim($val_match, '"');
		}
		return false;
	}