MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / extractClassName

Function extractClassName

extlibs/catch/include/catch/catch.hpp:13701–13712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13699 }
13700
13701 std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
13702 std::string className = classOrQualifiedMethodName;
13703 if( startsWith( className, '&' ) )
13704 {
13705 std::size_t lastColons = className.rfind( "::" );
13706 std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
13707 if( penultimateColons == std::string::npos )
13708 penultimateColons = 1;
13709 className = className.substr( penultimateColons, lastColons-penultimateColons );
13710 }
13711 return className;
13712 }
13713
13714} // end namespace Catch
13715// end catch_test_case_registry_impl.cpp

Callers 1

AutoRegMethod · 0.85

Calls 2

substrMethod · 0.80
startsWithFunction · 0.70

Tested by

no test coverage detected