MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / trimSpaces

Function trimSpaces

extern/happly/happly.h:1229–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1227namespace {
1228
1229inline std::string trimSpaces(const std::string& input) {
1230 size_t start = 0;
1231 while (start < input.size() && input[start] == ' ') start++;
1232 size_t end = input.size();
1233 while (end > start && (input[end - 1] == ' ' || input[end - 1] == '\n' || input[end - 1] == '\r')) end--;
1234 return input.substr(start, end - start);
1235}
1236
1237inline std::vector<std::string> tokenSplit(const std::string& input) {
1238 std::vector<std::string> result;

Callers 2

tokenSplitFunction · 0.85
parseHeaderMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected