src/Util/Strings.php
public static function indent(string $s, int $level = 1, string $chars = "\t"): string
    {
        if ($level > 0) {
            $s = static::replace($s, '#(?:^|[\r\n]+)(?=[^\r\n])#', '$0' . \str_repeat($chars, $level));
        }

        return $s;
    }
public static function indent(string $s, int $level = 1, string $chars = "\t"): string
    {
        if ($level > 0) {
            $s = static::replace($s, '#(?:^|[\r\n]+)(?=[^\r\n])#', '$0' . \str_repeat($chars, $level));
        }

        return $s;
    }
public static function indent ( string $ s , int $ level = 1 , string $ chars = "\t" ) : string { if ( $ level > 0 ) { $ s = static :: replace ( $ s , '#(?:^|[\r\n]+)(?=[^\r\n])#' , '$0' . \ str_repeat ( $ chars , $ level ) ) ; } return $ s ; }
Indents the content from the left.

@param  string $s UTF-8 encoding or 8-bit
@param  int    $level
@param  string $chars

@return string
Indents the content from the left .