Detect if auto-indent required

@param string $string
@return bool
6540
public function need_indent($string){
		$first_letter = mb_substr($string, 0, 1, 'UTF-8');
		$match = !preg_match('/[ 　【《〔〝『「（”"\'’—\(\)]/u', $first_letter, $matches);
		return (bool)$match;
	}
12203
public function endsWith(string $string) : bool
    {
        return substr($this->path, - strlen($string)) === $string;
    }
1180613
private function formatStringAsTextBlock($string)
    {
        if (!is_string($string)) {
            return '';
        }

        $string = wordwrap($string, $this->maxLineLength - $this->prefixLength);

        $stringLines = explode(PHP_EOL, $string);
        foreach ($stringLines as &$line) {
            $line = str_repeat(' ', $this->prefixLength).$line;
        }

        $string = implode(PHP_EOL, $stringLines);

        // needed to remove the unnecessary prefix added to the first line
        $string = trim($string);

        return $string;
    }
1229762
public function isValid($string)
    {
        foreach ($this->getPatterns() as $pattern) {
            if (strpos($string, $pattern) === 0) {
                $this->match = substr($string, 0, strlen($pattern));

                return true;
            }
        }

        return false;
    }
965471
public function indent($string, $spaces = 2) {
        $indentation = str_repeat(' ', $spaces);
        $lines = explode("\n", $string);

        foreach ($lines as $index => $line) {
            $lines[$index] = $indentation . $line;
        }

        return implode("\n", $lines);
    }
74471
public static function validateTrimmed($string)
    {
        if (SetupHelper::trim($string) === $string) {
            return (string)$string;
        }

        throw new InvalidArgumentException(
            sprintf(
                'Provided string "%1$s" was not trimmed.',
                $string
            )
        );
    }
496034
protected function hasExpressions(string $string): bool
    {
        foreach (self::STOPS as $symbol) {
            if (strpos($string, $symbol) !== false) {
                return true;
            }
        }

        return false;
    }
129732
public static function validateLowerCase($string)
    {
        if (SetupHelper::getLowerCase($string) === $string) {
            return (string)$string;
        }

        throw new InvalidArgumentException(
            sprintf(
                'Provided string "%1$s" was not in lowercase.',
                $string
            )
        );
    }
127110
public static function pathPrefixedByLangCode($string)
    {
        if (strlen($string) <= 3) {
            return false;
        }

        $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []);
        $parts = explode('/', trim($string, '/'));

        if (count($parts) > 0 && in_array($parts[0], $languages_enabled)) {
            return true;
        }

        return false;
    }
1085628
public static function isFirstName($string) {
        static $pattern = '/^([a-zäöüÄÖÜ]([\'-]?[a-zäöüßéÄÖÜ])+ *)+$/';
        return is_string($string) && strlen($string) && preg_match($pattern, strtolower($string));
    }
1003954
protected function escape($string)
    {
        if (preg_match('/["\s,]/', $string) === false) {
            return addslashes($string);
        } else {
            return sprintf('"%s"', addcslashes($string, '"\\'));
        }
    }
1128490
public static function detectEncoding($string)
    {
        if (Utf8::isUtf8($string)) {
            return static::ENCODING;
        }

        if ($bom = Bom::extract($string)) {
            return Bom::getBomEncoding($bom);
        }

        return mb_detect_encoding($string, 'ISO-8859-1,Windows-1252', true) ?: null;
    }
687108
public static function isStreetNumber($string) {
        static $pattern = '/^[0-9A-Za-z-\/]+$/';
        return is_string($string) && strlen($string) && preg_match($pattern, strtolower($string));
    }
483704
public function format($string) {
        if ($this->isAnsiEnabled()) {
            return $this->formatAnsi($string);
        }

        return $this->formatPlain($string);
    }
1327479
protected function isSoftBool($string)
    {
        if (!is_scalar($string) || $string === null) {
            return false;
        }
        
        $string = (string) $string;
        
        return $string == '0' || $string == '1';
    }
985357
public function clean($string)
    {
        if (!empty($string)) {
            $string = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $string);
            $string = htmlspecialchars(strip_tags($string, $this->_allowableTags));
            $string = str_replace('href=', 'rel="nofollow" href=', $string);

            return $string;
        }
        return false;
    }
1335598
private static function __underlineBorder($string)
    {
        $border          = new Border(Border::TYPE_UNDERLINE);
        $borderedElement = new BorderedElement($string, $border);

        return $borderedElement->render();
    }