| 121 | } |
| 122 | |
| 123 | void 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 |
nothing calls this directly
no outgoing calls
no test coverage detected