Added some more '/* getopt not needed */' lines.
[oweals/busybox.git] / utility.c
index 7fd4cad7d8e7caf6d27192278e1f664321e4881c..092cfdb10d20b069fd135800e95ebd126badff91 100644 (file)
--- a/utility.c
+++ b/utility.c
@@ -1828,6 +1828,19 @@ void chomp(char *s)
 }
 #endif
 
+#if defined(BB_SH)
+void trim(char *s)
+{
+       /* trim trailing whitespace */
+       while (isspace(s[strlen(s)-1]))
+               s[strlen(s)-1]='\0';
+
+       /* trim leading whitespace */
+       memmove(s, &s[strspn(s, " \n\r\t\v")], strlen(s));
+
+}
+#endif
+
 /* END CODE */
 /*
 Local Variables: