blockPrefix.php
Table of Contents
Functions
- blockPrefix() : string
- Prefix and indent each line of a multi-line string or array of lines.
Functions
blockPrefix()
Prefix and indent each line of a multi-line string or array of lines.
blockPrefix(array<string|int, mixed>|string $lines, string $prefix[, string|int $indent = '' ][, string $separator = PHP_EOL ][, bool $keepEmptyLines = true ]) : string
Parameters
- $lines : array<string|int, mixed>|string
-
Array of lines or multi-line string.
- $prefix : string
-
Prefix to apply before each line.
- $indent : string|int = ''
-
Indentation (string or number of spaces).
- $separator : string = PHP_EOL
-
Line separator (default: PHP_EOL).
- $keepEmptyLines : bool = true
-
Whether to keep empty lines (default: true).
Tags
Return values
string —Formatted multi-line string.