Returns the parameter value from the "=" and beyond.

@param string $value     to append
@param bool   $encoded
@param bool   $firstLine

@return string
547565
private function getEndOfParameterValue($value, $encoded = false, $firstLine = false)
    {
        if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {
            $value = '"'.$value.'"';
        }
        $prepend = '=';
        if ($encoded) {
            $prepend = '*=';
            if ($firstLine) {
                $prepend = '*='.$this->getCharset()."'".$this->getLanguage().
                    "'";
            }
        }

        return $prepend.$value;
    }
370011
private function encodeQuery(string $value): string
    {
        return preg_replace_callback(
            '/(?:[^'.self::UNRESERVED.self::SUB_DELIMS.':@%~\/\[\]\?]+|%(?![A-Fa-f0-9]{2}))/',
            function (array $match) {
                return rawurlencode($match[0]);
            },
            $value
        );
    }
758671
public function line($value, $line = 1)
    {
        if (!isset($value)) {
            return null;
        }
        
        $lines = explode("\n", $value);
        
        return isset($lines[$line - 1]) ? $lines[$line - 1] : null;
    }
27938
public static function lcfirst($str, $encoding = null)
    {
        $encoding = $encoding === null ? mb_internal_encoding() : $encoding;

        switch (static::strlen($str, $encoding)) {
            case 0:
                return '';
                break;
            case 1:
                return static::strtolower($str, $encoding);
                break;
            default:
                preg_match('/^(.{1})(.*)$/us', $str, $matches);

                return static::strtolower($matches[1], $encoding) . $matches[2];
                break;
        }
    }
409560
public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
    {
        if ($this->canonical) {
            $string = $this->canonicalize($string);
        }

        return $this->safeWordwrap($string, $maxLineLength, "\r\n");
    }
98375
public static function wraps_value($char, $value)
    {
        return substr((string) $value,  0, 1) == $char
            && substr((string) $value, -1, 1) == $char;
    }
674603
public function parameter($value, $isValue = false)
    {
        return $isValue ? $this->expr->literal($value) : $value;
    }
1178409
private function parseList(array $lines, $value, $start)
    {
        $html = '';
        $minSpace = 99999;
        $secondMinSpace = 99999;
        $found = false;
        $secondFound = false;
        $rows = array();
        // count levels
        foreach ($lines as $key => $line) {
            if (preg_match("/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i", $line, $matches)) {
                $space = strlen($matches[1]);
                $type = false !== strpos('+-*', $matches[2]) ? 'ul' : 'ol';
                $minSpace = min($space, $minSpace);
                $found = true;
                if ($space > 0) {
                    $secondMinSpace = min($space, $secondMinSpace);
                    $secondFound = true;
                }
                $rows[] = array($space, $type, $line, $matches[4]);
            } else {
                $rows[] = $line;
                if (preg_match("/^(\s*)/", $line, $matches)) {
                    $space = strlen($matches[1]);
                    
                    if ($space > 0) {
                        $secondMinSpace = min($space, $secondMinSpace);
                        $secondFound = true;
                    }
                }
            }
        }
        $minSpace = $found ? $minSpace : 0;
        $secondMinSpace = $secondFound ? $secondMinSpace : $minSpace;
        $lastType = '';
        $leftLines = array();
        $leftStart = 0;
        foreach ($rows as $key => $row) {
            if (is_array($row)) {
                list ($space, $type, $line, $text) = $row;
                if ($space != $minSpace) {
                    $leftLines[] = preg_replace("/^\s{" . $secondMinSpace . "}/", '', $line);
                } else {
                    if (!empty($leftLines)) {
                        $html .= "<li>" . $this->parse(implode("\n", $leftLines), true, $start + $leftStart) . "</li>";
                    }
                    if ($lastType != $type) {
                        if (!empty($lastType)) {
                            $html .= "</{$lastType}>";
                        }
                        $html .= "<{$type}>";
                    }
                    $leftStart = $key;
                    $leftLines = array($text);
                    $lastType = $type;
                }
            } else {
                $leftLines[] = preg_replace("/^\s{" . $secondMinSpace . "}/", '', $row);
            }
        }
        if (!empty($leftLines)) {
            $html .= "<li>" . $this->parse(implode("\n", $leftLines), true, $start + $leftStart) . "</li></{$lastType}>";
        }
        return $html;
    }
851822
private static function toPlainValue($value)
    {
        if (is_string($value)) {
            $value = strip_tags($value);
            $value = html_entity_decode($value, ENT_QUOTES | ENT_XML1, 'UTF-8');
            $value = trim($value);

            return ($value === '') ? null : $value;
        }

        return $value;
    }
262160
protected function decode($encoded) {
		$val = substr($encoded, 1);
		switch ($encoded[0]) {
			case self::T_ARRAY:
				return json_decode($val, true);
			case self::T_INT:
				return intval($val);
			case self::T_BOOLEAN:
				return !!$val;
			case self::T_DOUBLE:
				return floatval($val);
			case self::T_OBJECT:
				return unserialize($val);
			default:
				return $val;
		}
	}
301079
public static function upperFirst(string $str, string $encoding = null) : string
    {
        $encoding = $encoding ?: utils\Str::encoding($str);

        // Uppercase the first character and append the remainder.
        return mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding) . mb_substr($str, 1, null, $encoding);
    }
797250
public static function exactLength($value, int $length, string $encoding = 'UTF-8'): bool
    {
        if (!static::isStringCastable($value)) {
            return false;
        }

        $strlen = (int) mb_strlen((string) $value, $encoding);

        return $strlen === $length;
    }
70485
protected static function _escape( $value, $encoding = null )
    {
        $encoding or $encoding = self::_detectEncoding( $value );

        if ( $encoding === 'UTF-8' ) {
            # when possible force invisible characters to have some sort of display
            $value = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\x9F]/u', '�', $value );
        }

        $value = htmlspecialchars( $value, ENT_QUOTES );
        if ( function_exists( 'mb_encode_numericentity' ) ) {
            return mb_encode_numericentity(
                $value,
                array( 0x80, 0xffff, 0, 0xffff, ),
                $encoding
            );
        } else {
            return $value;
        }
    }
1046176
public function filter($value)
    {
        if (!is_scalar($value) && !is_array($value)) {
            return $value;
        }

        // a unicode safe way of converting characters to \x00\x00 notation
        $pregQuotedSeparator = preg_quote($this->separator, '#');

        if (StringUtils::hasPcreUnicodeSupport()) {
            $patterns = [
                '#(' . $pregQuotedSeparator.')(\P{Z}{1})#u',
                '#(^\P{Z}{1})#u',
            ];
            if (!extension_loaded('mbstring')) {
                $replacements = [
                    function ($matches) {
                        return strtoupper($matches[2]);
                    },
                    function ($matches) {
                        return strtoupper($matches[1]);
                    },
                ];
            } else {
                $replacements = [
                    function ($matches) {
                        return mb_strtoupper($matches[2], 'UTF-8');
                    },
                    function ($matches) {
                        return mb_strtoupper($matches[1], 'UTF-8');
                    },
                ];
            }
        } else {
            $patterns = [
                '#(' . $pregQuotedSeparator.')([\S]{1})#',
                '#(^[\S]{1})#',
            ];
            $replacements = [
                function ($matches) {
                    return strtoupper($matches[2]);
                },
                function ($matches) {
                    return strtoupper($matches[1]);
                },
            ];
        }

        $filtered = $value;
        foreach ($patterns as $index => $pattern) {
            $filtered = preg_replace_callback($pattern, $replacements[$index], $filtered);
        }
        return $filtered;
    }
231642
public function transform(string $value, int $start = 0, int $length = null): string {
        return $length === null ? substr($value, $start) : substr($value, $start, $length);
    }
160524
public function getValue(bool $urldecoded = true) : string
    {
        return (($urldecoded === true) ? rawurldecode($this->value) : $this->value);
    }
908865
public static function Equal ($string1, $string2, $encoding = Encoding::DEFAULT_ENCODING) {
		return (self::Compare($string1, $string2, $encoding) === 0);
	}