]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - src/StringUtils.py
Added the StringUtils module with the is_integer() function.
[dead/census-tools.git] / src / StringUtils.py
diff --git a/src/StringUtils.py b/src/StringUtils.py
new file mode 100644 (file)
index 0000000..871f3fc
--- /dev/null
@@ -0,0 +1,7 @@
+def is_integer(s):
+    try:
+        x = int(s)
+        return True
+    except:
+        return False
+