Reindent code by removing the common leading spaces and adding the specified indent.

Synopsis

Declared in <mrdocs/Support/String.hpp>

std::string
reindentCode(
    std::string_view code,
    std::size_t indent = 0);

Return Value

The modified code block.

Parameters

Name Description

code

The code block to unindent.

indent

The number of spaces to insert in front of each line after trimming.

Created with MrDocs