...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <ctype.h> #include <stddef.h> sizeptrdiff_t count_preceding_whitespace(const char *s) { const char *t = s; /* possibly *t < 0 */ while (*t && isspace(*t)) { ++t; } return t - s; } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <ctype.h> #include <stddef.h> sizeptrdiff_t count_preceding_whitespace(const char *s) { const char *t = s; while (*t && isspace((unsigned char)*t)) { ++t; } return t - s; } |
...