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

Function extractClassName

unittests/catch.hpp:10070–10081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10068 }
10069
10070 std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
10071 std::string className = classOrQualifiedMethodName;
10072 if( startsWith( className, '&' ) )
10073 {
10074 std::size_t lastColons = className.rfind( "::" );
10075 std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
10076 if( penultimateColons == std::string::npos )
10077 penultimateColons = 1;
10078 className = className.substr( penultimateColons, lastColons-penultimateColons );
10079 }
10080 return className;
10081 }
10082
10083} // end namespace Catch
10084// 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