MCPcopy Create free account
hub / github.com/SIPp/sipp / trim

Function trim

src/strings.cpp:123–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void trim(char *s)
124{
125 char *p = s;
126 while(isspace(*p)) {
127 p++;
128 }
129 int l = strlen(p);
130 for (int i = l - 1; i >= 0 && isspace(p[i]); i--) {
131 p[i] = '\0';
132 }
133 memmove(s, p, l + 1);
134}
135
136
137#ifdef GTEST

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected