MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / trimSpaces

Function trimSpaces

source/MaterialXCore/Util.cpp:148–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148string trimSpaces(const string& str)
149{
150 const char SPACE(' ');
151
152 size_t start = str.find_first_not_of(SPACE);
153 string result = (start == std::string::npos) ? EMPTY_STRING : str.substr(start);
154 size_t end = result.find_last_not_of(SPACE);
155 result = (end == std::string::npos) ? EMPTY_STRING : result.substr(0, end + 1);
156 return result;
157}
158
159StringVec splitNamePath(const string& namePath)
160{

Callers 5

remapEnumerationMethod · 0.85
remapEnumerationMethod · 0.85
remapEnumerationMethod · 0.85
fromValueStringFunction · 0.85
remapEnumerationMethod · 0.85

Calls 1

substrMethod · 0.80

Tested by

no test coverage detected