MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / prependPercent

Function prependPercent

Engine/source/console/console.cpp:103–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static const char * prependPercent ( const char * name )
104{
105 if(name[0] != '%')
106 {
107 S32 len = dStrlen(name);
108 AssertFatal(len < sizeof(scratchBuffer)-2, "CONSOLE: name too long");
109 scratchBuffer[0] = '%';
110 dMemcpy(scratchBuffer + 1, name, len + 1);
111 name = scratchBuffer;
112 }
113 return name;
114}
115
116//--------------------------------------
117void ConsoleConstructor::init( const char *cName, const char *fName, const char *usg, S32 minArgs, S32 maxArgs, bool isToolOnly, ConsoleFunctionHeader* header )

Callers 3

getLocalVariableEntryFunction · 0.85
getAddLocalVariableEntryFunction · 0.85
getLocalVariableFunction · 0.85

Calls 2

dStrlenFunction · 0.50
dMemcpyFunction · 0.50

Tested by

no test coverage detected