aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.c b/util.c
index ca793ce..5f847fa 100644
--- a/util.c
+++ b/util.c
@@ -161,3 +161,11 @@ void shiftLeft(char* str, size_t size, size_t shift) {
str++;
}
}
+
+int isNumber(char* str) {
+ while (*str >= ' ') {
+ if (*str < '0' || *str > '9') return 0;
+ str++;
+ }
+ return 1;
+}