src/Printable.php
private function string(string $value): string
    {
        if ($this->callable && is_callable($value)) {
            return sprintf('function %s()', $value);
        }

        return strlen($value) > $this->strlim
            ? $this->quoted(substr($value, 0, $this->strlim) . '...')
            : $this->quoted($value);
    }
private function string(string $value): string
    {
        if ($this->callable && is_callable($value)) {
            return sprintf('function %s()', $value);
        }

        return strlen($value) > $this->strlim
            ? $this->quoted(substr($value, 0, $this->strlim) . '...')
            : $this->quoted($value);
    }
Return a formatted string from the given string.

Prepend the string with an ellipsis when it is longer than the limit.

@param string $value
@return string