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

Function extractClassName

Source/ThirdParty/catch2/catch.hpp:14324–14335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14322 }
14323
14324 std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
14325 std::string className(classOrQualifiedMethodName);
14326 if( startsWith( className, '&' ) )
14327 {
14328 std::size_t lastColons = className.rfind( "::" );
14329 std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
14330 if( penultimateColons == std::string::npos )
14331 penultimateColons = 1;
14332 className = className.substr( penultimateColons, lastColons-penultimateColons );
14333 }
14334 return className;
14335 }
14336
14337} // end namespace Catch
14338// end catch_test_case_registry_impl.cpp

Callers 1

AutoRegMethod · 0.85

Calls 2

startsWithFunction · 0.85
substrMethod · 0.80

Tested by

no test coverage detected