ps: add -o tty and -o rss support
[oweals/busybox.git] / libbb / skip_whitespace.c
index 02c1f5828897a42c6def21c97d054a26cabb3a0e..bdfb97d70258a91ec7acd8f992ec9fbf1641e006 100644 (file)
@@ -7,12 +7,19 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <ctype.h>
 #include "libbb.h"
 
 char *skip_whitespace(const char *s)
 {
+       /* NB: isspace('0') returns 0 */
        while (isspace(*s)) ++s;
 
        return (char *) s;
 }
+
+char *skip_non_whitespace(const char *s)
+{
+       while (*s && !isspace(*s)) ++s;
+
+       return (char *) s;
+}