MCPcopy Create free account
hub / github.com/apache/trafficserver / extractClassName

Function extractClassName

lib/catch2/catch.hpp:14331–14342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14329 }
14330
14331 std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
14332 std::string className(classOrQualifiedMethodName);
14333 if( startsWith( className, '&' ) )
14334 {
14335 std::size_t lastColons = className.rfind( "::" );
14336 std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
14337 if( penultimateColons == std::string::npos )
14338 penultimateColons = 1;
14339 className = className.substr( penultimateColons, lastColons-penultimateColons );
14340 }
14341 return className;
14342 }
14343
14344} // end namespace Catch
14345// end catch_test_case_registry_impl.cpp

Callers 1

AutoRegMethod · 0.85

Calls 3

startsWithFunction · 0.85
rfindMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected