MCPcopy Create free account
hub / github.com/catchorg/Catch2 / printHeaderString

Function printHeaderString

extras/catch_amalgamated.cpp:11906–11915  ·  view source on GitHub ↗

if string has a : in first line will set indent to follow it on subsequent lines

Source from the content-addressed store, hash-verified

11904 // if string has a : in first line will set indent to follow it on
11905 // subsequent lines
11906 void printHeaderString(std::ostream& os, std::string const& _string, std::size_t indent = 0) {
11907 std::size_t i = _string.find(": ");
11908 if (i != std::string::npos)
11909 i += 2;
11910 else
11911 i = 0;
11912 os << TextFlow::Column(_string)
11913 .indent(indent + i)
11914 .initialIndent(indent) << '\n';
11915 }
11916
11917 std::string escape(StringRef str) {
11918 std::string escaped = static_cast<std::string>(str);

Callers 3

printOpenHeaderMethod · 0.70
printSectionHeaderMethod · 0.70

Calls 3

ColumnClass · 0.70
findMethod · 0.45
indentMethod · 0.45

Tested by

no test coverage detected