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

Function StringInsertStubBefore

trinity/Utilities/StringUtils.h:11–21  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Inserts insertStr before the last instance of beforeSubstr in baseString. --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

9// Inserts insertStr before the last instance of beforeSubstr in baseString.
10// --------------------------------------------------------------------------------
11inline bool StringInsertStubBefore( std::string& baseString, const char* beforeSubstr, const char* insertStr )
12{
13 size_t index = baseString.rfind( beforeSubstr );
14 if( index == std::string::npos )
15 {
16 return false;
17 }
18
19 baseString.insert( index, insertStr );
20 return true;
21}
22
23// --------------------------------------------------------------------------------
24// Description:

Callers 3

LoadOverlayMethod · 0.85
ModifyTextureResPathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected