MCPcopy Create free account
hub / github.com/Auburn/FastNoise2 / string_format

Function string_format

tools/NodeEditor/FastNoiseNodeEditor.cpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75template<size_t N, typename... Args>
76std::string string_format( const char (&format)[N], const Args&... args )
77{
78 int size_s = std::snprintf( nullptr, 0, format, args... );
79 if( size_s <= 0 )
80 {
81 return "";
82 }
83 auto size = static_cast<size_t>( size_s + 1 );
84 std::string buf( size, 0 );
85 std::snprintf( buf.data(), size, format, args... );
86 return buf;
87}
88
89const char* string_format( const char* txt )
90{

Callers 1

DoHoverPopupFunction · 0.85

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected