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

Function TrimFirstWord

Engine/source/ts/collada/colladaAppNode.cpp:39–57  ·  view source on GitHub ↗

Trim leading and trailing whitespace from the first word in the string Note that the string is modified.

Source from the content-addressed store, hash-verified

37// Trim leading and trailing whitespace from the first word in the string
38// Note that the string is modified.
39static char* TrimFirstWord(char* str)
40{
41 char* value = str;
42
43 // Trim leading whitespace
44 while ( value && *value && dIsspace( *value ) )
45 value++;
46
47 // Trim trailing whitespace
48 if ( value && *value )
49 {
50 char* end = value + 1;
51 while ( *end && !dIsspace( *end ) )
52 end++;
53 *end = '\0';
54 }
55
56 return value;
57}
58
59ColladaAppNode::ColladaAppNode(const domNode* node, ColladaAppNode* parent)
60 : p_domNode(node), appParent(parent),

Callers 1

ColladaAppNodeMethod · 0.85

Calls 1

dIsspaceFunction · 0.85

Tested by

no test coverage detected