MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / GetSpaces

Function GetSpaces

CodeGenerator.cpp:3421–3430  ·  view source on GitHub ↗

XXX: replace with std::format once it is available in all std-libs

Source from the content-addressed store, hash-verified

3419
3420// XXX: replace with std::format once it is available in all std-libs
3421auto GetSpaces(std::string::size_type offset)
3422{
3423 static const std::string_view spaces{" "sv};
3424
3425 if(offset >= spaces.size()) {
3426 return ""sv;
3427 } else {
3428 return spaces.substr(0, spaces.size() - offset);
3429 }
3430}
3431//-----------------------------------------------------------------------------
3432
3433void CodeGenerator::InsertArg(const FieldDecl* stmt)

Callers 1

InsertArgMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected