aboutsummaryrefslogtreecommitdiffstats
path: root/drhstrings.c
diff options
context:
space:
mode:
Diffstat (limited to 'drhstrings.c')
-rw-r--r--drhstrings.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drhstrings.c b/drhstrings.c
new file mode 100644
index 0000000..7585149
--- /dev/null
+++ b/drhstrings.c
@@ -0,0 +1,15 @@
+#include <string.h>
+#include <stdbool.h>
+
+bool isnumber(char* text) {
+ for(int j = strlen(text); j > 0; j--) {
+ if(text[j] < '0' && text[j] > '9') {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool notdelim(char c) {
+ return c != ' ' && c != '\n' && c != '\t' && c != '\0';
+}