Trim leading and trailing whitespace from the first word in the string Note that the string is modified.
| 37 | // Trim leading and trailing whitespace from the first word in the string |
| 38 | // Note that the string is modified. |
| 39 | static 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 | |
| 59 | ColladaAppNode::ColladaAppNode(const domNode* node, ColladaAppNode* parent) |
| 60 | : p_domNode(node), appParent(parent), |
no test coverage detected