Commit 98d6a1fdda5fa0605dee933930b5b7ddff4feb37

nulltoken 2012-07-04T16:24:09

util: add git__isdigit()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/util.h b/src/util.h
index adc6650..abdd543 100644
--- a/src/util.h
+++ b/src/util.h
@@ -204,6 +204,11 @@ GIT_INLINE(bool) git__isalpha(int c)
     return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
 }
 
+GIT_INLINE(bool) git__isdigit(int c)
+{
+    return (c >= '0' && c <= '9');
+}
+
 GIT_INLINE(bool) git__isspace(int c)
 {
     return (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == '\v');