]> git.droids-corp.org - protos/libecoli.git/blobdiff - libecoli/ecoli_string.c
add ecoli_editline and enhance yaml parser
[protos/libecoli.git] / libecoli / ecoli_string.c
index 77238181350e33d72297069cd7eab53d91564060..fd427b4a0d64f96a70594f9f21ab7d6376624a38 100644 (file)
@@ -6,6 +6,7 @@
 #include <stddef.h>
 #include <string.h>
 #include <stdio.h>
+#include <ctype.h>
 
 #include <ecoli_assert.h>
 #include <ecoli_malloc.h>
@@ -76,3 +77,13 @@ int ec_asprintf(char **buf, const char *fmt, ...)
 
        return ret;
 }
+
+bool ec_str_is_space(const char *s)
+{
+       while (*s) {
+               if (!isspace(*s))
+                       return false;
+               s++;
+       }
+       return true;
+}