# Returns a String.
541629
function getFormatExtension()
    {
        $environment = $this->environment;

        $formatExtension = current(array_filter(
            $this->getExtensions(),
            function($ext) use ($environment) {
                return
                    isset($environment->contentTypes[$ext])
                    and !$environment->engines->get($ext);
            }
        ));

        return $formatExtension
            ?: array_search($this->getEngineContentType(), $environment->contentTypes)
            ?: join('', $this->getExtensions());
    }
1302168
public function toString()
    {
        if (empty($this->stringRepresentation)) {
            $this->stringRepresentation = sprintf('%s%s_%s', static::MESSAGE_TO_STRING_PREFIX, $this->getSourceId(), $this->getResourceId());
        }
        return $this->stringRepresentation;
    }
88222
function toString()
    {
        $uri = '';

        if ($this->getScheme())
            $uri .= $this->getScheme() . ':'. '//';

        $uri .= $this->getAuthority();
        $uri .= parent::toString();

        if ($this->getHost() && (!$this->getQuery()->isEmpty() || $this->getFragment()))
            $uri .= '/';

        $replace = function ($match) { return rawurlencode($match[0]); };
        if (\Poirot\Std\cast($this->getQuery())->toArray()) {
            $regex   = '/(?:[^' .'a-zA-Z0-9_\-\.~' .'!\$&\'\(\)\*\+,;=' .'%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/';
            $uri .= "?" . preg_replace_callback($regex, $replace, $this->getQuery()->toString());
        }

        if ($this->getFragment()) {
            $regex   = '/(?:[^' .'a-zA-Z0-9_\-\.~' .'!\$&\'\(\)\*\+,;=' .'%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/';
            $uri .= "#" . preg_replace_callback($regex, $replace, $this->getFragment());
        }

        return $uri;
    }
314069
def toString(self) -> str:
        """"""
        return ' '.join(attr.html for attr in self._dict.values())
1130796
protected function get()
    {
        $c               = $this->lookAhead;
        $this->lookAhead = null;
        if ($c === null) {
            if ($this->inputIndex < $this->inputLength) {
                $c = $this->input[$this->inputIndex];
                $this->inputIndex += 1;
            } else {
                return;
            }
        }
        if ($c === "\r" || $c === "\n") {
            return "\n";
        }
        if (ord($c) < self::ORD_SPACE) {
            return ' ';
        }
        return $c;
    }
1315252
public function toString()
    {
        $newLine = "\n";
        $string = $newLine . $newLine;

        $i = 0;
        foreach ($this->dns as $dns) {
            ++$i;
            $string .= 'DNS.' . $i . ' = ' . $dns .$newLine;
        }

        $i = 0;
        foreach ($this->ip as $ip) {
            ++$i;
            $string .= 'IP.' . $i . ' = ' . $ip .$newLine;
        }

        $i = 0;
        foreach ($this->url as $url) {
            ++$i;
            $string .= 'URL.' . $i . ' = ' . $url .$newLine;
        }

        return $string;
    }
1172100
public function ToString()
	{
		$result = $this->LocalName;

		if ( ! empty( $this->Prefix ) )
		{
		    $result = $this->Prefix . ':' . $result;
		}
		return $result;
	}
25293
public function toString()
    {
        $matchToString = function ($key, $value) {
            return ' "' . $key . '" is "' . $value . '"';
        };

        $matchesToString = function ($matches) use ($matchToString) {
            $matchesAsString = implode(' and ', array_map(
                $matchToString,
                array_keys($matches),
                array_values($matches)
            ));

            return '(' . $matchesAsString . ')';
        };

        $allMatchesAsString = implode(
            "\n or ",
            array_map($matchesToString, $this->matches)
        );


        return $this->getStubForToString() . $allMatchesAsString;
    }
388495
public function getDescription(): string
    {
        if (!$this->minValue) {
            return __('must have a length lower than "%d"', $this->maxValue);
        }
        if (!$this->maxValue) {
            return __('must have a length greater than "%d"', $this->minValue);
        }
        if ($this->minValue === $this->maxValue) {
            return __('must have a length "%d"', $this->minValue);
        }
        return __('must have a length between "%d" and "%d"', $this->minValue, $this->maxValue);
    }
175947
function toString()
    {
        $ModeXXX = implode('', $this->mode_xxx);
        if (!array_key_exists($ModeXXX, $this->mode_available))
            throw new \Exception(sprintf(
                'Invalid Open Mode Statement (%s). it`s must readable/writable or both with optional flags.'
                .' like: r+, W, rb+, ...'
                , $ModeXXX
            ));

        $mode = $this->mode_available[$ModeXXX];
        if ($this->isBinary()) {
            $base = substr($mode, 0, 1);
            // r|b|+
            $mode = $base.'b'.substr($mode, 1);
        }

        return $mode;
    }
798136
public function toString()
    {
        $string = '';
        $properties = $this->getIterator();
        foreach ($properties as $property) {
            $string .= $property->toString();
        }

        return $string;
    }
345077
public function char()
    {
        $str = '';

        foreach (func_get_args() as $char) {
            if (is_int($char)) {
                $str .= chr($char);
            }
        }

        return $str;
    }
769764
protected function toStringFunction()
    {
        $string = ($this->isFinal() ? 'final ' : '')
            . ($this->isAbstract() ? 'abstract ' : '')
            . $this->getVisibility() . ' '
            . ($this->isStatic() ? 'static ' : '')
            . 'function ';

        return $string;
    }
705903
public function toString ()
	{
		$content = "<VirtualHost {$this->address}:{$this->port}>" . PHP_EOL;
		
		foreach ($this->directives as $directive) {
			$content .= $directive->toString() . PHP_EOL;
		}
		
		$content .= PHP_EOL;
		
		foreach ($this->directories as $directory) {
			$content .= $directory->toString() . PHP_EOL;
		}
		$content .= PHP_EOL;
		
		$content .= "</VirtualHost>";
		
		return $content;
	}
177563
public static function toString()
    {
        $return = [];

        foreach (static::$globals as $key => $value) {
            $type = gettype($value);

            if (is_callable($value)) {
                $valueString = 'callable';
                $type = 'callable';
            } elseif (is_array($value)) {
                $valueString = implode(', ', $value);
            } else {
                $valueString = (string)$value;
            }

            $return[] = sprintf(
                '"%s": (%s) %s',
                $key,
                $type,
                $valueString
            );
        }

        return implode(PHP_EOL, $return);
    }
907619
public function toString()
    {
        if (!$this->_renderer || !$this->_renderer->canRender($this)) {
            return '';
        }

        return $this->_renderer->render($this);
    }
217085
public function getString($value)
    {
        if (is_array($value)
            || $value instanceof \Iterator) {
            return '';
        }
        if ($value instanceof Collection) {
            $value = $value->toArray();
        }
        return implode(',', $value);
    }