MCPcopy Create free account
hub / github.com/carbonengine/trinity / StringInsertStubAfter

Function StringInsertStubAfter

trinity/Utilities/StringUtils.h:27–37  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Inserts insertStr after the last instance of afterSubstr in baseString. --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

25// Inserts insertStr after the last instance of afterSubstr in baseString.
26// --------------------------------------------------------------------------------
27inline bool StringInsertStubAfter( std::string& baseString, const char* afterSubstr, const char* insertStr )
28{
29 size_t index = baseString.rfind( afterSubstr );
30 if( index == std::string::npos )
31 {
32 return false;
33 }
34
35 baseString.insert( index + strlen( afterSubstr ), insertStr );
36 return true;
37}
38
39// --------------------------------------------------------------------------------
40// Description:

Callers 1

GetCompleteShaderPathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected