indent
Prefixes every non-blank line of s with prefix.
Blank lines (empty or whitespace only) are left untouched, so no trailing whitespace is
introduced. Lines are split on '\n' only, and a trailing newline is preserved. It is the
inverse of dedent for text indented with a fixed prefix.
Import
Section titled “Import”Cargo feature string (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
s | &str | The text to indent. |
prefix | &str | The text to prepend to every non-blank line. |
Returns
Section titled “Returns”String
