summaryrefslogtreecommitdiff
path: root/strutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'strutil.h')
-rw-r--r--strutil.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/strutil.h b/strutil.h
index e0c38a1..c442169 100644
--- a/strutil.h
+++ b/strutil.h
@@ -20,7 +20,15 @@
#ifndef STRUTIL_H__
#define STRUTIL_H__
+#include <stddef.h>
#include <string.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+/* Parse an integer from the (possibly not null-terminated) string s
+ * of length len, and place the result in *rvp. If return value is
+ * false, *rvp is untouched. */
+bool str2intmax(intmax_t * rvp, char const * s, size_t len);
/* Return a pointer to first nonblank character in s. */
const char * left_trimmed(const char * s);