+char *chugString(char *s)
+{
+ if (s == NULL)
+ return NULL;
+
+ char *start;
+
+ for (start = (char *)s; *start && isspace(*start); start++)
+ ;
+
+ memmove(s, start, strlen(start) + 1);
+
+ return s;
+}
+
+char *chompString(char *s)
+{
+ if (s == NULL)
+ return NULL;
+
+ int len = strlen(s);
+
+ while (len--)
+ {
+ if (isspace(s[len]))
+ s[len] = '\0';
+ else
+ break;
+ }
+
+ return s;
+}
+
+char *stripString(char *s)
+{
+ return chugString(chompString(s));
+}
+